diff mplayer.c @ 21561:600ae729ba6e

show subtitle language in OSD ; patch by Otvos Attila
author nicodvb
date Sun, 10 Dec 2006 17:28:01 +0000
parents ad7616b01560
children e655e64087d3
line wrap: on
line diff
--- a/mplayer.c	Sun Dec 10 17:25:54 2006 +0000
+++ b/mplayer.c	Sun Dec 10 17:28:01 2006 +0000
@@ -2240,6 +2240,19 @@
                      strlen(tmp) < 20 ? tmp : tmp+strlen(tmp)-19);
             return M_PROPERTY_OK;
         }
+
+#ifdef USE_DVDNAV
+        if(stream->type==STREAMTYPE_DVDNAV) {
+            if(vo_spudec && dvdsub_id >= 0) {
+                unsigned char lang[3];
+                if(dvdnav_lang_from_sid(stream, dvdsub_id, lang)) {
+                    snprintf(*(char**)arg, 63, "(%d) %s", dvdsub_id, lang);
+                    return M_PROPERTY_OK;
+                }
+            }
+        }
+#endif
+
         if (demuxer->type == DEMUXER_TYPE_MATROSKA && dvdsub_id >= 0) {
             char lang[40] = MSGTR_Unknown;
             demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 9);