mirror of https://github.com/mpv-player/mpv
Remove the now unused demux_mkv_change_subs function
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23620 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
547ae18be2
commit
65d087b955
|
@ -3592,45 +3592,6 @@ demux_mkv_control (demuxer_t *demuxer, int cmd, void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
/** \brief Change the current subtitle track and return its ID.
|
||||
|
||||
Changes the current subtitle track. If the new subtitle track is a
|
||||
VobSub track then the SPU decoder will be re-initialized.
|
||||
|
||||
\param demuxer The demuxer whose subtitle track will be changed.
|
||||
\param new_num The number of the new subtitle track. The number must be
|
||||
between 0 and demux_mkv_num_subs - 1.
|
||||
|
||||
\returns The Matroska track number of the newly selected track.
|
||||
*/
|
||||
int
|
||||
demux_mkv_change_subs (demuxer_t *demuxer, int new_num)
|
||||
{
|
||||
mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv;
|
||||
mkv_track_t *track;
|
||||
int i, num;
|
||||
|
||||
num = 0;
|
||||
track = NULL;
|
||||
for (i = 0; i < mkv_d->num_tracks; i++)
|
||||
{
|
||||
if ((mkv_d->tracks[i]->type == MATROSKA_TRACK_SUBTITLE) &&
|
||||
(mkv_d->tracks[i]->subtitle_type != MATROSKA_SUBTYPE_UNKNOWN))
|
||||
num++;
|
||||
if (num == (new_num + 1))
|
||||
{
|
||||
track = mkv_d->tracks[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (track == NULL)
|
||||
return -1;
|
||||
|
||||
demuxer->sub->sh = demuxer->s_streams[track->tnum];
|
||||
|
||||
return track->tnum;
|
||||
}
|
||||
|
||||
/** \brief Get the language code for a subtitle track.
|
||||
|
||||
Retrieves the language code for a subtitle track if it is known.
|
||||
|
|
Loading…
Reference in New Issue