Mercurial > mplayer.hg
diff libmpdemux/demux_ogg.c @ 21038:bfd340cdac88
Generalize subtitle switching, demux_ogg does not need a special case
anymore and demux_mov works now, too.
author | reimar |
---|---|
date | Sun, 19 Nov 2006 14:23:54 +0000 |
parents | cdf75ea331c9 |
children | 493b34d15885 |
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c Sun Nov 19 14:18:45 2006 +0000 +++ b/libmpdemux/demux_ogg.c Sun Nov 19 14:23:54 2006 +0000 @@ -488,7 +488,7 @@ // check for -slang if subs are uninitialized yet if (os->text && d->sub->id < 0 && demux_ogg_check_lang(val, dvdsub_lang)) { - d->sub->id = id; + d->sub->id = index; dvdsub_id = index; mp_msg(MSGT_DEMUX, MSGL_V, "Ogg demuxer: Displaying subtitle stream id %d which matched -slang %s\n", id, val); } @@ -538,7 +538,7 @@ vorbis_info_clear(&vi); } if (os->text) { - if (id == d->sub->id) // don't want to add subtitles to the demuxer for now + if (id == demux_ogg_sub_id(d->sub->id)) // don't want to add subtitles to the demuxer for now demux_ogg_add_sub(os,pack); return 0; } @@ -718,16 +718,6 @@ /* defined in demux_mov.c */ extern unsigned int store_ughvlc(unsigned char *s, unsigned int v); -/** \brief Return the number of subtitle tracks in the file. - - \param demuxer The demuxer for which the number of subtitle tracks - should be returned. -*/ -int demux_ogg_num_subs(demuxer_t *demuxer) { - ogg_demuxer_t *ogg_d = (ogg_demuxer_t *)demuxer->priv; - return ogg_d->n_text; -} - /** \brief Change the current subtitle stream and return its ID. \param demuxer The demuxer whose subtitle stream will be changed.