Commit f2db0411 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Avoid a malloc(0) (We don't call free on it, valgrind is not happy)

parent 28126abd
...@@ -3307,9 +3307,10 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt ) ...@@ -3307,9 +3307,10 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
break; break;
} }
pid->es->fmt.i_extra_languages = p_decoded->i_code_count-1; pid->es->fmt.i_extra_languages = p_decoded->i_code_count-1;
pid->es->fmt.p_extra_languages = if( pid->es->fmt.i_extra_languages > 0 )
malloc( sizeof(*pid->es->fmt.p_extra_languages) * pid->es->fmt.p_extra_languages =
pid->es->fmt.i_extra_languages ); malloc( sizeof(*pid->es->fmt.p_extra_languages) *
pid->es->fmt.i_extra_languages );
for( i = 0; i < pid->es->fmt.i_extra_languages; i++ ) { for( i = 0; i < pid->es->fmt.i_extra_languages; i++ ) {
msg_Dbg( p_demux, "bang" ); msg_Dbg( p_demux, "bang" );
pid->es->fmt.p_extra_languages[i].psz_language = pid->es->fmt.p_extra_languages[i].psz_language =
......
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