mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
use -1 for the granulepos in the metadata packet
This commit is contained in:
@@ -1022,11 +1022,9 @@ FLAC__StreamEncoderWriteStatus write_callback(const FLAC__StreamEncoder *encoder
|
||||
/*@@@ WATCHOUT:
|
||||
* this depends on the behavior of libFLAC that we will get one
|
||||
* write_callback first with all the metadata (and 'samples'
|
||||
* will be 0), then one for each frame, hence the +1 so that the
|
||||
* metadata packet is packet 0, the first audio frame is 1, and
|
||||
* so on.
|
||||
* will be 0), then one write_callback for each frame.
|
||||
*/
|
||||
op.packetno = (samples == 0? 0 : encoder_wrapper->current_frame + 1);
|
||||
op.packetno = (samples == 0? -1 : (int)encoder_wrapper->current_frame);
|
||||
op.bytes = bytes;
|
||||
|
||||
if (encoder_wrapper->bytes_written == bytes)
|
||||
|
||||
Reference in New Issue
Block a user