[FFmpeg-devel] [PATCH] wma decoder return value does not fit actually used data

Reimar Döffinger Reimar.Doeffinger
Fri Nov 30 22:55:39 CET 2007


Hello,
On Fri, Nov 30, 2007 at 10:15:49PM +0100, Michael Niedermayer wrote:
> On Fri, Nov 30, 2007 at 05:43:51PM +0100, Reimar D?ffinger wrote:
> > currently the wma decoder always returns s->block_align, but actually it
> > (tries to) use up all data in the input buffer.
> > Even worse, it also returns s->block_align when the buffer size is
> > smaller than that.
> > There are two ways to fix it: either change the return value to return
> > the size of the buffer or use s->block_align as buffer size.
> > The former has the disadvantage that we would then need a separate
> > AVParser (AFAICT), whereas the latter fixes the playback problems in
> > both ffplay and mplayer without further changes.
> > A sample file is incoming/wmabugs.wmv , which plays fine with attached
> > patch.
> > Does it look okay to apply to you?
> 
> well, a parser might be better (or not) its hard to say after all we
> dont really have a wma spec which says how packets should look ...

Well, as I understand it there are different kinds of packets: those
always block_align big (parser should be simple, but seems a bit
overkill to me), superframes that don't have to be byte-aligned though,
and subframe. Or at least something like this. At least it looks like a
bit messy and thus hard to come up with a sane way.

> so iam ok with the patch ...

Applied.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list