From: Derk-Jan Hartman Date: Fri, 13 Oct 2006 14:04:54 +0000 (+0000) Subject: Don't add MPEG-TS program data for programs that don't exist. Patch by Dnumgis. This... X-Git-Tag: 0.9.0-test0~9980 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3267066db2af32d3d5838d9575ae8c6a189b8333;p=vlc Don't add MPEG-TS program data for programs that don't exist. Patch by Dnumgis. This fixes #683 --- diff --git a/modules/demux/ts.c b/modules/demux/ts.c index 376c1e1024..a54264da60 100644 --- a/modules/demux/ts.c +++ b/modules/demux/ts.c @@ -2652,6 +2652,8 @@ static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h, msg_Dbg( p_demux, "PSINewTableCallBack: table 0x%x(%d) ext=0x%x(%d)", i_table_id, i_table_id, i_extension, i_extension ); #endif + if( p_demux->p_sys->pid[0].psi->i_pat_version == -1 ) + return; if( i_table_id == 0x42 ) { diff --git a/src/input/es_out.c b/src/input/es_out.c index 047074a1b3..03aba946c4 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -594,8 +594,11 @@ static void EsOutProgramMeta( es_out_t *out, int i_group, vlc_meta_t *p_meta ) } } - if( p_pgrm == NULL ) - p_pgrm = EsOutProgramAdd( out, i_group ); + if( p_pgrm == NULL ) { + free( psz_cat ); + msg_Dbg( p_input, "Trying to add meta for non-existing program" ); + return; + } /* Update the description text of the program */ if( psz_title && *psz_title )