--- src/flac/encode.c 2008-12-23 11:40:28.000000000 +0000 +++ src/flac/encode.c 2009-03-01 00:22:16.000000000 +0000 @@ -1061,7 +1061,10 @@ print_error_with_state(&encoder_session, "ERROR during encoding"); return EncoderSession_finish_error(&encoder_session); } - data_bytes -= bytes_read; + + if (!options.common.ignore_chunk_sizes) { + data_bytes -= bytes_read; + } } } }