previous commit used the byte offset; this one actually does use the sample number...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 6 Feb 2002 07:37:42 +0000 (07:37 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 6 Feb 2002 07:37:42 +0000 (07:37 +0000)
src/flac/encode.c

index de0d8d03f9253c66eeb7c828991168d261f2a2c3..74ba83bd60345e5ef6592ee7d04a58b1e10d41e5 100644 (file)
@@ -1018,7 +1018,7 @@ FLAC__StreamEncoderWriteStatus write_callback(const FLAC__StreamEncoder *encoder
 
                memset(&op, 0, sizeof(op));
                op.packet = (unsigned char *)buffer;
-               op.granulepos = encoder_wrapper->bytes_written - 1;
+               op.granulepos = encoder_wrapper->samples_written - 1;
                op.packetno = encoder_wrapper->current_frame;
                op.bytes = bytes;