[FFmpeg-devel] [PATCH] mp3enc: Fix Xing tag identification string for CBR files
Tobias Rapp
t.rapp at noa-audio.com
Mon May 7 11:55:05 CEST 2012
Michael Niedermayer wrote:
> > diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
> > index 29c0780..cb61e37 100644
> > --- a/libavformat/mp3enc.c
> > +++ b/libavformat/mp3enc.c
> > @@ -180,7 +180,11 @@ static int mp3_write_xing(AVFormatContext *s)
> >
> > avio_wb32(s->pb, header);
> > ffio_fill(s->pb, 0, xing_offset);
> > - avio_wb32(s->pb, MKBETAG('X', 'i', 'n', 'g'));
> > + /* use "Xing" identification string for VBR files and "Info" for CBR */
> > + if (codec->flags & CODEC_FLAG_QSCALE)
>
> This is problematic as this flag will only be set reliable on encoding
> but not on transcoding (-acodec copy)
>
> better would be to update the tag in mp3_fix_xing() at the end
> after storing all packets if they all "match"/dont "match" in size
Good catch. Have reworked the patch to look at all the packet headers and
decide for CBR/VBR.
Regards,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mp3enc-Fix-Xing-tag-identification-string-for-CBR-f.patch
Type: text/x-patch
Size: 2314 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120507/e7f7f3bf/attachment.bin>
More information about the ffmpeg-devel
mailing list