[MPlayer-cvslog] r20179 - trunk/libmpdemux/demux_mkv.c
reimar
subversion at mplayerhq.hu
Thu Oct 12 19:18:21 CEST 2006
Author: reimar
Date: Thu Oct 12 19:18:20 2006
New Revision: 20179
Modified:
trunk/libmpdemux/demux_mkv.c
Log:
Simplify demux_mkv_get_sub_lang
Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c (original)
+++ trunk/libmpdemux/demux_mkv.c Thu Oct 12 19:18:20 2006
@@ -3935,23 +3935,10 @@
int maxlen)
{
mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv;
- mkv_track_t *track;
- int i, num;
-
- num = 0;
- for (i = 0; i < mkv_d->num_tracks; i++)
- {
- track = mkv_d->tracks[i];
- if (track->type == MATROSKA_TRACK_SUBTITLE)
- num++;
- if (num == (track_num + 1))
- {
+ mkv_track_t *track = demux_mkv_find_track_by_num (mkv_d, track_num, MATROSKA_TRACK_SUBTITLE);
if ((track->language != NULL) &&
strcmp(track->language, "und"))
strncpy(lang, track->language, maxlen);
- return;
- }
- }
}
/** \brief Get the language code for an audio track.
More information about the MPlayer-cvslog
mailing list