[MPlayer-cvslog] r36802 - trunk/gui/dialog/menu.c

ib subversion at mplayerhq.hu
Fri Feb 7 20:23:09 CET 2014


Author: ib
Date: Fri Feb  7 20:23:09 2014
New Revision: 36802

Log:
Add language to VOBsub subtitle track information.

Modified:
   trunk/gui/dialog/menu.c

Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c	Fri Feb  7 20:16:22 2014	(r36801)
+++ trunk/gui/dialog/menu.c	Fri Feb  7 20:23:09 2014	(r36802)
@@ -26,6 +26,8 @@
 #include "mixer.h"
 #include "mpcommon.h"
 #include "mp_core.h"
+#include "sub/sub.h"
+#include "sub/vobsub.h"
 
 #include "menu.h"
 #include "dialog.h"
@@ -671,8 +673,20 @@ GtkWidget * CreatePopUpMenu( void )
     for ( i=0;i < global_sub_size;i++ )
      {
       int ret = -1;
-      char lng[32], tmp[64];
-      if ( i >= subs0 + subs1 )
+      char lng[32], tmp[64], *lang;
+      /* VOBsub */
+      if ( ( i >= subs0 && i < subs0 + subs1 ) && vo_vobsub )
+       {
+        lang = vobsub_get_id( vo_vobsub, vobsub_get_id_by_index( vo_vobsub, i - subs0 ) );
+
+        if ( lang )
+         {
+          av_strlcpy( lng, lang, sizeof(lng) );
+          ret = 0;
+         }
+       }
+      /* embedded (demuxer) */
+      else if ( i >= subs0 + subs1 )
        {
         for ( j=0;j < MAX_S_STREAMS;j++ )
          {


More information about the MPlayer-cvslog mailing list