Scott F
2007-Jul-25 00:05 UTC
[Flac] Bug: flac --replay-gain thinks that I used --no-padding
If I use flac to encode with the --replay-gain option, I get a warning about the --no-padding option... "NOTE: --replay-gain may leave a small PADDING block even with --no-padding" ...even though I'm not using --no-padding. And the file does end up with a small padding block, so changing tags is slow. I'd fixed this bug in my own copy of flac 1.1.4, but forgot to submit the patch... I just noticed when I upgraded to 1.2.0, this bug reappeared! :) At the end of my email is the way I changed it; also works for 1.2.0. Thank you Josh for doing a bang-up job on FLAC. I look forward to the improved 24-bit compression that your decoder changes will allow. Regards, Scott --- flac-1.1.4/src/flac/main.c.orig Mon Feb 5 22:32:16 2007 +++ flac-1.1.4/src/flac/main.c Thu Jun 28 16:00:05 2007 @@ -413,7 +413,10 @@ * tags that we will set later, to avoid rewriting the * whole file. */ - if(option_values.padding <= 0) { + if(option_values.padding == -1) { + /* Leave it alone; use the default. */ + } + else if(option_values.padding <= 0) { flac__utils_printf(stderr, 1, "NOTE: --replay-gain may leave a small PADDING block even with --no-padding\n"); option_values.padding = GRABBAG__REPLAYGAIN_MAX_TAG_SPACE_REQUIRED; }
Josh Coalson
2007-Jul-25 14:45 UTC
[Flac] Bug: flac --replay-gain thinks that I used --no-padding
--- Scott F <graue@oceanbase.org> wrote:> If I use flac to encode with the --replay-gain > option, I get a warning about the --no-padding > option... > > "NOTE: --replay-gain may leave a small PADDING block even with > --no-padding" > > ...even though I'm not using --no-padding. And the > file does end up with a small padding block, so > changing tags is slow.hmm, I can't reproduce that warning unless I use --no-padding or -P0, are you using any padding option? can you post the entire command-line? Josh ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
Scott F
2007-Jul-25 16:00 UTC
[Flac] Bug: flac --replay-gain thinks that I used --no-padding
Josh Coalson <xflac@yahoo.com> wrote:> --- Scott F <graue@oceanbase.org> wrote: > > > If I use flac to encode with the --replay-gain > > option, I get a warning about the --no-padding > > option... > > > > "NOTE: --replay-gain may leave a small PADDING block even with > > --no-padding" > > > > ...even though I'm not using --no-padding. And the > > file does end up with a small padding block, so > > changing tags is slow. > > hmm, I can't reproduce that warning unless I use --no-padding or > -P0, are you using any padding option? can you post the entire > command-line?With an unmodified flac 1.2.0, here's everything I can tell you: $ uname -a OpenBSD acquiescent4 3.9 GENERIC#0 i386 $ file robot.wav robot.wav: Microsoft RIFF, WAVE audio data, 16 bit, stereo 44100 Hz $ flac --replay-gain robot.wav NOTE: --replay-gain may leave a small PADDING block even with --no-padding flac 1.2.0, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Type `flac' for details. robot.wav: wrote 1195530 bytes, ratio=0.898 $ metaflac --list robot.flac METADATA block #0 type: 0 (STREAMINFO) is last: false length: 34 minimum blocksize: 4096 samples maximum blocksize: 4096 samples minimum framesize: 14 bytes maximum framesize: 16394 bytes sample_rate: 44100 Hz channels: 2 bits-per-sample: 16 total samples: 332800 MD5 signature: baa7a6600e90050735e6e52437fca10f METADATA block #1 type: 3 (SEEKTABLE) is last: false length: 18 seek points: 1 point 0: sample_number=0, stream_offset=0, frame_samples=4096 METADATA block #2 type: 4 (VORBIS_COMMENT) is last: false length: 223 vendor string: reference libFLAC 1.2.0 20070715 comments: 5 comment[0]: REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB comment[1]: REPLAYGAIN_TRACK_GAIN=-12.88 dB comment[2]: REPLAYGAIN_TRACK_PEAK=1.00000000 comment[3]: REPLAYGAIN_ALBUM_GAIN=-12.88 dB comment[4]: REPLAYGAIN_ALBUM_PEAK=1.00000000 METADATA block #3 type: 1 (PADDING) is last: true length: 7 $ Regards, Scott