[MPlayer-dev-eng] [PATCH] Handle AV_CODEC_ID_SUBRIP subtitles
Philip Langdale
philipl at overt.org
Sun Aug 19 00:20:09 CEST 2012
On Sat, 18 Aug 2012 23:58:23 +0200
Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> On Sat, Aug 18, 2012 at 02:50:01PM -0700, Philip Langdale wrote:
> > +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 53, 100)
> > + else if(codec->codec_id == AV_CODEC_ID_SUBRIP)
>
> Just define AV_CODEC_ID_SUBRIP as some nonsense for old versions,
> this clutters the code too much..
I guess so, but there's another conditional a few lines below this
for a new CODEC_ID that's done in exactly the same way.
> > - if(prog->sid == -2 &&
> > priv->avfc->streams[program->stream_index[i]]->codec->codec_id ==
> > CODEC_ID_TEXT) +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54,
> > 53, 100)
> > + is_subrip =
> > priv->avfc->streams[program->stream_index[i]]->codec->codec_id ==
> > AV_CODEC_ID_SUBRIP; +#endif
> > + if(prog->sid == -2 &&
> > +
> > (priv->avfc->streams[program->stream_index[i]]->codec->codec_id ==
> > CODEC_ID_TEXT ||
> > + is_subrip))
> > prog->sid = program->stream_index[i];
>
>
> Admittedly unrelated, but this is badly in need of
> cleanup/refactoring, though more importantly: what is the point of
> that condition? I have a feeling it should be removed.
I honestly couldn't tell you. It's testing some special case but I
don't know if it's related to matroska at all. if not, I don't need
to modify it.
--phil
More information about the MPlayer-dev-eng
mailing list