Commit be62f3b2 authored by Josh Coalson's avatar Josh Coalson
Browse files

minor comments

parent ab5c1d15
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "FLAC/seekable_stream_decoder.h" #include "FLAC/seekable_stream_decoder.h"
typedef struct FLAC__SeekableStreamDecoderProtected { typedef struct FLAC__SeekableStreamDecoderProtected {
FLAC__bool md5_checking; /* if true, generate MD5 signature of decoded data and compare against signature in the Encoding metadata block */ FLAC__bool md5_checking; /* if true, generate MD5 signature of decoded data and compare against signature in the STREAMINFO metadata block */
FLAC__SeekableStreamDecoderState state; FLAC__SeekableStreamDecoderState state;
} FLAC__SeekableStreamDecoderProtected; } FLAC__SeekableStreamDecoderProtected;
......
...@@ -794,15 +794,16 @@ FLAC__StreamEncoderWriteStatus write_callback_(const OggFLAC__SeekableStreamEnco ...@@ -794,15 +794,16 @@ FLAC__StreamEncoderWriteStatus write_callback_(const OggFLAC__SeekableStreamEnco
if(local__fwrite(buffer, sizeof(FLAC__byte), bytes, file_encoder->private_->file) == bytes) { if(local__fwrite(buffer, sizeof(FLAC__byte), bytes, file_encoder->private_->file) == bytes) {
file_encoder->private_->bytes_written += bytes; file_encoder->private_->bytes_written += bytes;
file_encoder->private_->samples_written += samples; file_encoder->private_->samples_written += samples;
/* we keep a high watermark on the number of frames written because /* we keep a high watermark on the number of frames written
* when the encoder goes back to write metadata, 'current_frame' * because when the encoder goes back to write metadata,
* will drop back to 0. * 'current_frame' will drop back to 0.
*/ */
file_encoder->private_->frames_written = max(file_encoder->private_->frames_written, current_frame+1); file_encoder->private_->frames_written = max(file_encoder->private_->frames_written, current_frame+1);
/*@@@@@@ We would like to add an '&& samples > 0' to the if clause /*@@@@@@ We would like to add an '&& samples > 0' to the if
* here but currently because of the nature of Ogg writing 'samples' * clause here but currently because of the nature of our Ogg
* is always 0 (see ogg_encoder_aspect.c). The downside is extra * writing implementation, 'samples' is always 0 (see
* progress callbacks. * ogg_encoder_aspect.c). The downside is extra progress
* callbacks.
*/ */
if(0 != file_encoder->private_->progress_callback) if(0 != file_encoder->private_->progress_callback)
file_encoder->private_->progress_callback(file_encoder, file_encoder->private_->bytes_written, file_encoder->private_->samples_written, file_encoder->private_->frames_written, file_encoder->private_->total_frames_estimate, file_encoder->private_->client_data); file_encoder->private_->progress_callback(file_encoder, file_encoder->private_->bytes_written, file_encoder->private_->samples_written, file_encoder->private_->frames_written, file_encoder->private_->total_frames_estimate, file_encoder->private_->client_data);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment