Commit d001ebd4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Error handling

parent 98f70f4f
...@@ -724,15 +724,11 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -724,15 +724,11 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
break; break;
case 's': case 's':
{ {
char *lang; char *lang = NULL;
if( p_input ) if( p_input )
{ lang = var_GetNonEmptyString( p_input, "sub-language" );
lang = var_GetString( p_input, "sub-language" ); if( lang == NULL )
}
else
{
lang = strdup( b_empty_if_na ? "" : "-" ); lang = strdup( b_empty_if_na ? "" : "-" );
}
INSERT_STRING( 1, lang ); INSERT_STRING( 1, lang );
break; break;
} }
...@@ -820,15 +816,12 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -820,15 +816,12 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
break; break;
case 'O': case 'O':
{ {
char *lang; char *lang = NULL;
if( p_input ) if( p_input )
{ lang = var_GetNonEmptyString( p_input,
lang = var_GetString( p_input, "audio-language" ); "audio-language" );
} if( lang == NULL )
else
{
lang = strdup( b_empty_if_na ? "" : "-" ); lang = strdup( b_empty_if_na ? "" : "-" );
}
INSERT_STRING( 1, lang ); INSERT_STRING( 1, lang );
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment