# HG changeset patch # User ib # Date 1391800989 0 # Node ID 8ca87345a6c27b701567cb0949e72e44df612243 # Parent 5697842046d25398229bd0b6cb58e0df82002984 Add language to VOBsub subtitle track information. diff -r 5697842046d2 -r 8ca87345a6c2 gui/dialog/menu.c --- a/gui/dialog/menu.c Fri Feb 07 19:16:22 2014 +0000 +++ b/gui/dialog/menu.c Fri Feb 07 19:23:09 2014 +0000 @@ -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 @@ 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++ ) {