[MPlayer-cvslog] r35540 - trunk/command.c

reimar subversion at mplayerhq.hu
Fri Nov 30 22:22:32 CET 2012


Author: reimar
Date: Fri Nov 30 22:22:32 2012
New Revision: 35540

Log:
Display correct subtitle language for demux_lavf.

Modified:
   trunk/command.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Fri Nov 30 21:51:02 2012	(r35539)
+++ trunk/command.c	Fri Nov 30 22:22:32 2012	(r35540)
@@ -1492,7 +1492,12 @@ static int mp_property_sub(m_option_t *p
         }
         if (dvdsub_id >= 0) {
             char lang[40] = MSGTR_Unknown;
-            demuxer_sub_lang(mpctx->demuxer, dvdsub_id, lang, sizeof(lang));
+            int id = dvdsub_id;
+            // HACK: for DVDs sub->sh/id will be invalid until
+            // we actually get the first packet
+            if (d_sub && d_sub->sh)
+                id = d_sub->id;
+            demuxer_sub_lang(mpctx->demuxer, id, lang, sizeof(lang));
             snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
             return M_PROPERTY_OK;
         }


More information about the MPlayer-cvslog mailing list