[FFmpeg-devel] [PATCH] asfenc: too many payloads in a packet

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue May 13 21:01:31 CEST 2014


On Tue, May 13, 2014 at 01:05:54AM +0200, Michael Niedermayer wrote:
> On Mon, May 12, 2014 at 03:26:11PM -0700, Aaron Graham wrote:
> > In the ASF specification:
> > http://www.microsoft.com/en-us/download/details.aspx?id=14995
> > 
> > the section on Multiple payloads (5.2.3.3) describes the bit fields used to
> > specify payload length type and number of payloads. The number of payloads
> > field is a 6-bit field, meaning a packet can hold a maximum of 63 payloads.
> > 
> > asfenc.c was not honoring this, and if more than 63 payloads would fit in a
> > packet, the "number of payloads" field would overflow into the "payload
> > length type" field, causing parsing errors in ffplay.
> > 
> > You can reproduce this with any AAC file that has several seconds of
> > silence in the beginning (lots of very small AAC frames). Use this ffmpeg
> > command:
> > 
> > $ ffmpeg -i silence.m4a -acodec copy silence.asf
> > 
> > Note that ffplay will get lots of errors.
> > 
> > Anyway, here's a patch to fix the problem:

For the future, please make sure you run diff the right way around (or
even better use git format-patch).
I was quite confused why you were removing the code to flush when max
packet count was reached...

> patch applied

I see Michael figured it out how it should work though and fixed it.


More information about the ffmpeg-devel mailing list