]> git.sesse.net Git - vlc/commitdiff
Don't add MPEG-TS program data for programs that don't exist. Patch by Dnumgis. This...
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 13 Oct 2006 14:04:54 +0000 (14:04 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 13 Oct 2006 14:04:54 +0000 (14:04 +0000)
modules/demux/ts.c
src/input/es_out.c

index 376c1e102423a3feb568ddc9fbe19c3c026ebdca..a54264da60f568198ead2723abb1715429bb91fa 100644 (file)
@@ -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 )
     {
index 047074a1b3a4a3604eae44ca2157211721ce051c..03aba946c4d96ddeb869966ee29c8b60c691c55f 100644 (file)
@@ -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 )