[FFmpeg-devel] [PATCH] seperate parser from codec selection

Paul Kendall paul
Tue May 26 09:19:50 CEST 2009

On Tuesday 26 May 2009 02:02:09 pm Michael Niedermayer wrote:
> On Sun, May 17, 2009 at 03:25:22PM +1200, Paul Kendall wrote:
> > This patch allows an AVStream to specify a parser_id separately to the
> > codec_id. This will be useful for streams such as DVB-T which has AAC
> > audio which may be contained in an LATM multiplexed stream.
> >
> > The patch will fall-back to using the codec_id for parser selection if
> > the parser_id is set to CODEC_ID_NONE, which is the default.
> I do not like having 2 codec ids.

Ok, the problem I have is that I have a parser for LATM
CODEC_ID_LATM, there is no codec, so it gets parsed, then nothing!
I tried changing the codec_id in the parser parse function to 
CODEC_ID_AAC, and it worked for the initial phase of playing i.e.
determining which codecs to use etc. Then it started to play
and found that codec_id was CODEC_ID_AAC so it send all the data
to the aac_parser, and of course that barfed on the LATM stream.

What is your suggested way to get this all working?

If there is another enum, for parsers, PARSER_ID_xxx then would it
be a completely separate ID space, i.e. have overlapping values.

Would all code that set's codec_id now also set parser_id and we use
parser_id for parser selection and codec_id for codec selection?

This would be a rather big change to ffmpeg I'd have thought, probably
not a bad one though, thinking about it :-)


More information about the ffmpeg-devel mailing list