Commit bb8a0acc authored by Rémi Duraffort's avatar Rémi Duraffort

factorize.

parent 9dd8eab9
......@@ -927,10 +927,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id,
{
if( psz_language && *psz_language )
{
text.psz_string = malloc( strlen( fmt->psz_description) +
strlen( psz_language ) + 10 );
sprintf( text.psz_string, "%s - [%s]", fmt->psz_description,
psz_language );
if( asprintf( &text.psz_string, "%s - [%s]", fmt->psz_description,
psz_language ) == -1 )
text.psz_string = NULL;
}
else text.psz_string = strdup( fmt->psz_description );
}
......
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