[MPlayer-cvslog] CVS: main mplayer.c,1.885,1.886

Paolo Tresoldi PaulTT syncmail at mplayerhq.hu
Thu Nov 10 00:18:40 CET 2005


CVS change done by Paolo Tresoldi (PaulTT)

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

Modified Files:
	mplayer.c 
Log Message:
reordered subtitles language OSD display, since it worked bad for ogm...

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.885
retrieving revision 1.886
diff -u -r1.885 -r1.886
--- mplayer.c	6 Nov 2005 18:01:52 -0000	1.885
+++ mplayer.c	9 Nov 2005 23:18:38 -0000	1.886
@@ -4131,44 +4131,45 @@
       } else
       if (osd_show_vobsub_changed) {
 	  snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesOff);
-	  if (vo_vobsub && vobsub_id >= 0) {
-	      const char *language = MSGTR_OSDnone;
-	      language = vobsub_get_id(vo_vobsub, (unsigned int) vobsub_id);
-	      snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, vobsub_id, language ? language : MSGTR_OSDunknown);
-	  }
+          switch (demuxer->type) {
+#ifdef HAVE_MATROSKA
+              case DEMUXER_TYPE_MATROSKA:
+                  if (dvdsub_id >= 0) {
+                      char lang[40] = MSGTR_OSDunknown;
+                      demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 39);
+                      lang[39] = 0;
+                      snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, lang);
+                  }
+                  break;
+#endif
 #ifdef HAVE_OGGVORBIS
-	  if (d_dvdsub && demuxer->type == DEMUXER_TYPE_OGG) {
-	      if (dvdsub_id >= 0) {
-		char *lang = demux_ogg_sub_lang(demuxer, dvdsub_id);
-		if (!lang) lang = MSGTR_OSDunknown;
-		snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, lang);
-	      }
-	  }
+              case DEMUXER_TYPE_OGG:
+                  if (d_dvdsub && dvdsub_id >= 0) {
+                      char *lang = demux_ogg_sub_lang(demuxer, dvdsub_id);
+                      snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, lang ? lang : MSGTR_OSDunknown);
+                  }
+                  break;
 #endif
+              default:
+                  if (vo_vobsub && vobsub_id >= 0) {
+                      char *language = MSGTR_OSDnone;
+                      language = vobsub_get_id(vo_vobsub, (unsigned int) vobsub_id);
+                      snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, vobsub_id, language ? language : MSGTR_OSDunknown);
+                  }
 #ifdef USE_DVDREAD
-	  if (vo_spudec && (demuxer->type != DEMUXER_TYPE_MATROSKA)) {
-	      if (dvdsub_id >= 0) {
-		  char lang[3] = "\0\0\0";
-		  int code = 0;
-		  code = dvd_lang_from_sid(stream, dvdsub_id);
-		  if (code) {
-		      lang[0] = code >> 8;
-		      lang[1] = code;
-		  }
-		  snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, code ? lang : MSGTR_OSDnone);
-	      }
-	  }
-#endif
-#ifdef HAVE_MATROSKA
-    if (demuxer->type == DEMUXER_TYPE_MATROSKA) {
-      char lang[40] = MSGTR_OSDunknown;
-      if (dvdsub_id >= 0) {
-        demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 39);
-        lang[39] = 0;
-	snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, lang);
-      }
-    }
+                  if (vo_spudec && dvdsub_id >= 0) {
+                      char lang[3] = "\0\0\0";
+                      int code = 0;
+                      code = dvd_lang_from_sid(stream, dvdsub_id);
+                      if (code) {
+                          lang[0] = code >> 8;
+                          lang[1] = code;
+                      }
+                      snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, code ? lang : MSGTR_OSDnone);
+                  }
 #endif
+                  break;
+          }
 	  osd_show_vobsub_changed--;
       } else
 #ifdef USE_SUB




More information about the MPlayer-cvslog mailing list