[FFmpeg-devel] [PATCH] speex extradata in flv demuxer

Aurelien Jacobs aurel
Tue Jun 23 14:32:27 CEST 2009

On Tue, Jun 23, 2009 at 12:46:21PM +0200, Michael Niedermayer wrote:
> On Mon, Jun 22, 2009 at 05:55:35PM -0400, Justin Ruggles wrote:
> > Michael Niedermayer wrote:
> > > On Sun, Jun 21, 2009 at 02:32:33PM -0400, Justin Ruggles wrote:
> > >> Hi,
> > >>
> > >> This patch for the FLV demuxer builds a Speex header and puts it in
> > >> extradata.  Our libspeex wrapper decoder works without it, but some
> > >> other decoders might not.  It is also needed for stream copy.
> > > 
> > > is this header flv specific? 
> > > if its not flv speific id say it does not belong in the flv muxer
> > > but maybe iam missing some details that make this the best solution ...
> > 
> > FLV does not contain the header at all, which is the reason for the
> > patch.  Instead FLV defines some of the values to be fixed and, from
> > what I can tell so far, either ignores the rest or assumes they will be
> > the libspeex default.  There is no Speex specification per-se (except
> > for RTFS), and the FLV/SWF spec does not say how this is handled.
> > 
> > An alternative to building a Speex header with FLV-specific values would
> > be a generic struct and functions to build/write/read a Speex header.
> > That would basically be a reimplementation of speex_header.[ch] from
> > libspeex.
> let me ask differently
> normally, an encoder build extradata that ALL muxers store,
> nothing you said explain why its not done like that. What you do is
> you have added code that appears to belong in the speex encoder into the
> muxer
> What am i missing?

You are missing the fact that the patch don't touch the muxer at all...
It add code to the demuxer. FLV files in the wild contain speex data with
no explicit extradata. Generating some extradata (matching the FLV default
speex parameters) is required for remuxing or decoding of those speex-in-FLV


More information about the ffmpeg-devel mailing list