[Mplayer-cvslog] CVS: main mplayer.c,1.777,1.778

Moritz Bunkus CVS syncmail at mplayerhq.hu
Tue Aug 24 23:37:43 CEST 2004


CVS change done by Moritz Bunkus CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv2030

Modified Files:
	mplayer.c 
Log Message:
Display the language code for subtitles from Matroska files.

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.777
retrieving revision 1.778
diff -u -r1.777 -r1.778
--- mplayer.c	24 Aug 2004 21:20:24 -0000	1.777
+++ mplayer.c	24 Aug 2004 21:37:40 -0000	1.778
@@ -3641,7 +3641,7 @@
 		snprintf(osd_text_tmp, 63, "Subtitles: (%d)", dvdsub_id);
 	  }
 #ifdef USE_DVDREAD
-	  if (vo_spudec) {
+	  if (vo_spudec && (demuxer->type != DEMUXER_TYPE_MATROSKA)) {
 	      char lang[5] = "none";
 	      int code = 0;
 	      if (dvdsub_id >= 0) code = dvd_lang_from_sid(stream, dvdsub_id);
@@ -3653,6 +3653,17 @@
 	      snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang);
 	  }
 #endif
+#ifdef HAVE_MATROSKA
+    if (demuxer->type == DEMUXER_TYPE_MATROSKA) {
+      char lang[10] = "unknown";
+      if (dvdsub_id >= 0) {
+        demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 9);
+        lang[9] = 0;
+      } else
+        strcpy(lang, "off");
+      snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang);
+    }
+#endif
 	  osd_show_vobsub_changed--;
       } else
 #ifdef USE_SUB




More information about the MPlayer-cvslog mailing list