[FFmpeg-devel] [PATCH] riff: don't pad extradata when writing ASF.

Michael Niedermayer michaelni
Sat Mar 13 01:13:46 CET 2010


On Fri, Mar 12, 2010 at 06:40:26AM +0100, Anton Khirnov wrote:
> On Thu, Mar 11, 2010 at 09:53:04PM +0100, Michael Niedermayer wrote:
> > On Thu, Mar 11, 2010 at 09:43:39PM +0100, Anton Khirnov wrote:
> > > fixes issue1512
> > > ---
> > >  libavformat/riff.c |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/libavformat/riff.c b/libavformat/riff.c
> > > index 0a3bc95..08001d9 100644
> > > --- a/libavformat/riff.c
> > > +++ b/libavformat/riff.c
> > > @@ -442,7 +442,7 @@ void ff_put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag
> > >  
> > >      put_buffer(pb, enc->extradata, enc->extradata_size);
> > >  
> > > -    if (enc->extradata_size & 1)
> > > +    if (!for_asf && enc->extradata_size & 1)
> > >          put_byte(pb, 0);
> > 
> > id suspect the outer size being wrong instead of this
> > but thats purely guessing, did you try to +1 it ?
> yes i did, according to a user in #ffmpeg it fixed playback in wmp10 but
> not wmp11 (<insert m$ joke here>). anyway this padding is not supposed
> to be here according to ASF specs.

well if you are sure tis is correct then commit it

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100313/62606e31/attachment.pgp>



More information about the ffmpeg-devel mailing list