[MPlayer-cvslog] r20174 - in trunk: libmpdemux/demux_mkv.c mplayer.c

ptt subversion at mplayerhq.hu
Thu Oct 12 16:11:39 CEST 2006


Author: ptt
Date: Thu Oct 12 16:11:39 2006
New Revision: 20174

Modified:
   trunk/libmpdemux/demux_mkv.c
   trunk/mplayer.c

Log:
modifications pointed out by reimar doffinger

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	(original)
+++ trunk/libmpdemux/demux_mkv.c	Thu Oct 12 16:11:39 2006
@@ -3969,23 +3969,11 @@
                        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_AUDIO)
-        num++;
-      if (num == (track_num + 1))
-        {
-          if ((track->language != NULL) &&
-              strcmp(track->language, "und"))
-            strlcpy(lang, track->language, maxlen);
-          return;
-        }
-    }
+  mkv_track_t *track = demux_mkv_find_track_by_num (mkv_d, track_num, MATROSKA_TRACK_AUDIO);
+  if ((track->language != NULL) &&
+      strcmp(track->language, "und"))
+    strlcpy(lang, track->language, maxlen);
+  return;
 }
 
 

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Thu Oct 12 16:11:39 2006
@@ -1816,6 +1816,7 @@
             if (code) {
                 lang[0] = code >> 8;
                 lang[1] = code;
+                lang[2] = 0;
             }
             snprintf(*(char**)arg, 63, "(%d) %s", audio_id, code ? lang : MSGTR_Unknown);
             return 1;



More information about the MPlayer-cvslog mailing list