[vlc-devel] commit: Fixed audio/spu language selection when none specified in dvdnav. ( Laurent Aimar )
git version control
git at videolan.org
Sat Sep 20 16:51:32 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Sep 19 21:57:40 2008 +0200| [aef002579e802838cf850bec6f62a387c42a3185] | committer: Laurent Aimar
Fixed audio/spu language selection when none specified in dvdnav.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aef002579e802838cf850bec6f62a387c42a3185
---
modules/access/dvdnav.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index da7521b..5a200cb 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -859,12 +859,18 @@ static char *DemuxGetLanguageCode( demux_t *p_demux, const char *psz_var )
char *p;
psz_lang = var_CreateGetString( p_demux, psz_var );
+ if( !psz_lang )
+ return strdup(LANGUAGE_DEFAULT);
+
/* XXX: we will use only the first value
* (and ignore other ones in case of a list) */
- if( ( p = strchr( psz_lang, ',' ) ) ) *p = '\0';
+ if( ( p = strchr( psz_lang, ',' ) ) )
+ *p = '\0';
for( pl = p_languages; pl->psz_iso639_1 != NULL; pl++ )
{
+ if( *psz_lang == '\0' )
+ continue;
if( !strcasecmp( pl->psz_eng_name, psz_lang ) ||
!strcasecmp( pl->psz_native_name, psz_lang ) ||
!strcasecmp( pl->psz_iso639_1, psz_lang ) ||
More information about the vlc-devel
mailing list