Commit ced16237 authored by Francois Cartegnie's avatar Francois Cartegnie

codec: tx3g: missing braces

refs c3c6e9b8
parent 2f966bd6
......@@ -262,12 +262,17 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
if ( i_psz_bytelength > 2 &&
( !memcmp( p_pszstart, "\xFE\xFF", 2 ) || !memcmp( p_pszstart, "\xFF\xFE", 2 ) )
)
{
psz_subtitle = FromCharset( "UTF-16", p_pszstart, i_psz_bytelength );
if ( !psz_subtitle ) return NULL;
}
else
{
psz_subtitle = malloc( i_psz_bytelength + 1 );
if ( !psz_subtitle ) return NULL;
memcpy( psz_subtitle, p_pszstart, i_psz_bytelength );
psz_subtitle[ i_psz_bytelength ] = '\0';
if ( !psz_subtitle ) return NULL;
memcpy( psz_subtitle, p_pszstart, i_psz_bytelength );
psz_subtitle[ i_psz_bytelength ] = '\0';
}
p_buf += i_psz_bytelength + sizeof(uint16_t);
for( uint16_t i=0; i < i_psz_bytelength; i++ )
......
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