[MPlayer-dev-eng] [PATCH] Correct bogus #ifs for codec ids (was: [MPlayer-cvslog] r36172 - trunk/libmpdemux/demux_lavf.c)
Dominik 'Rathann' Mierzejewski
dominik at greysector.net
Tue May 14 22:09:52 CEST 2013
On Tuesday, 14 May 2013 at 22:05, Reimar Döffinger wrote:
> 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)
That's what I'm trying to do - build current MPlayer against
FFmpeg-1.0.x. I didn't realize those were added to support Libav.
A comment or at least a few words in the SVN commit log would've
helped.
I'll see what I can do to produce a clean and non-intrusive patch.
Thanks for the explanation.
Regards,
--
MPlayer http://mplayerhq.hu | RPM Fusion http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the MPlayer-dev-eng
mailing list