[MPlayer-dev-eng] [PATCH] Correct bogus #ifs for codec ids (was: [MPlayer-cvslog] r36172 - trunk/libmpdemux/demux_lavf.c)

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue May 14 22:05:15 CEST 2013


On Tue, May 14, 2013 at 10:01:31PM +0200, Reimar Döffinger wrote:
> On Tue, May 14, 2013 at 09:34:59PM +0200, Dominik 'Rathann' Mierzejewski wrote:
> > Hi,
> > 
> > On Thursday, 18 April 2013 at 23:54, cboesch wrote:
> > [...]
> > > Modified: trunk/libmpdemux/demux_lavf.c
> > > ==============================================================================
> > > --- trunk/libmpdemux/demux_lavf.c	Mon Apr 15 04:23:17 2013	(r36171)
> > > +++ trunk/libmpdemux/demux_lavf.c	Thu Apr 18 23:54:53 2013	(r36172)
> > > @@ -441,7 +441,11 @@ static void handle_stream(demuxer_t *dem
> > >                  type = 't';
> > >              else if (codec->codec_id == AV_CODEC_ID_MOV_TEXT)
> > >                  type = 'm';
> > > -            else if (codec->codec_id == AV_CODEC_ID_SSA)
> > > +            else if (codec->codec_id == AV_CODEC_ID_SSA
> > > +#if LIBAVUTIL_VERSION_MICRO >= 100
> > > +                     || codec->codec_id == AV_CODEC_ID_ASS
> > > +#endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
> > > +                )
> > >                  type = 'a';
> > >              else if (codec->codec_id == AV_CODEC_ID_DVD_SUBTITLE)
> > >                  type = 'v';
> > 
> > I'm not sure why this one and several others before were added with that
> > #if condition, but it's clearly wrong. I'm attaching a patch which
> > corrects some of these.
> 
> I don't know what you are trying to do, but they are correct
> for what they were intended for (Libav compatibility) and you
> are breaking them like this.
> Supporting old FFmpeg versions isn't really something we've been
> doing, and they are not intended for that.

(Of course if someone wants to maintain it, I don't mind supporting
older versions as long as it does not get too ugly)


More information about the MPlayer-dev-eng mailing list