From 39bc0c2743ec2caa5bca2cd45cb4e55f5bab847f Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 6 Feb 2002 19:26:14 +0000 Subject: [PATCH] use -1 for the granulepos in the metadata packet --- src/flac/encode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)