]> git.sesse.net Git - vlc/commitdiff
demux: ts: fix NULL deref picking PCR (#13996)
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 26 Feb 2015 18:26:38 +0000 (19:26 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 26 Feb 2015 18:28:33 +0000 (19:28 +0100)
Doh!

modules/demux/ts.c

index d0638988f051f849f621bb0d4142e4cee2358c17..dc459de037c1b62ea00237b7df37d61631563985 100644 (file)
@@ -3045,7 +3045,7 @@ static int FindPCRCandidate( demux_sys_t *p_sys, ts_prg_psi_t *p_prg )
         ts_pid_t *p_pid = &p_sys->pid[i];
         if( p_pid->b_seen && p_pid->es && p_pid->es->id &&
             p_pid->i_owner_number == p_prg->i_number &&
-            p_cand->i_pid != i_previous )
+            (!p_cand || p_cand->i_pid != i_previous) )
         {
             if( p_pid->probed.i_pcr_count ) /* check PCR frequency first */
             {