diff --git a/src/flac/encode.c b/src/flac/encode.c index 3215daf2..30da076c 100644 --- a/src/flac/encode.c +++ b/src/flac/encode.c @@ -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)