Mercurial > mplayer.hg
comparison libmpdemux/demux_mkv.c @ 23600:dd8610d25dc5
Remove the now unused demux_mkv_change_subs function
author | reimar |
---|---|
date | Sun, 24 Jun 2007 08:12:08 +0000 |
parents | 8cc4fc6d86e1 |
children | a2c1e8b60819 |
comparison
equal
deleted
inserted
replaced
23599:88f55dca299b | 23600:dd8610d25dc5 |
---|---|
3590 default: | 3590 default: |
3591 return DEMUXER_CTRL_NOTIMPL; | 3591 return DEMUXER_CTRL_NOTIMPL; |
3592 } | 3592 } |
3593 } | 3593 } |
3594 | 3594 |
3595 /** \brief Change the current subtitle track and return its ID. | |
3596 | |
3597 Changes the current subtitle track. If the new subtitle track is a | |
3598 VobSub track then the SPU decoder will be re-initialized. | |
3599 | |
3600 \param demuxer The demuxer whose subtitle track will be changed. | |
3601 \param new_num The number of the new subtitle track. The number must be | |
3602 between 0 and demux_mkv_num_subs - 1. | |
3603 | |
3604 \returns The Matroska track number of the newly selected track. | |
3605 */ | |
3606 int | |
3607 demux_mkv_change_subs (demuxer_t *demuxer, int new_num) | |
3608 { | |
3609 mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv; | |
3610 mkv_track_t *track; | |
3611 int i, num; | |
3612 | |
3613 num = 0; | |
3614 track = NULL; | |
3615 for (i = 0; i < mkv_d->num_tracks; i++) | |
3616 { | |
3617 if ((mkv_d->tracks[i]->type == MATROSKA_TRACK_SUBTITLE) && | |
3618 (mkv_d->tracks[i]->subtitle_type != MATROSKA_SUBTYPE_UNKNOWN)) | |
3619 num++; | |
3620 if (num == (new_num + 1)) | |
3621 { | |
3622 track = mkv_d->tracks[i]; | |
3623 break; | |
3624 } | |
3625 } | |
3626 if (track == NULL) | |
3627 return -1; | |
3628 | |
3629 demuxer->sub->sh = demuxer->s_streams[track->tnum]; | |
3630 | |
3631 return track->tnum; | |
3632 } | |
3633 | |
3634 /** \brief Get the language code for a subtitle track. | 3595 /** \brief Get the language code for a subtitle track. |
3635 | 3596 |
3636 Retrieves the language code for a subtitle track if it is known. | 3597 Retrieves the language code for a subtitle track if it is known. |
3637 If the language code is "und" then do not copy it ("und" = "undefined"). | 3598 If the language code is "und" then do not copy it ("und" = "undefined"). |
3638 | 3599 |