]> git.sesse.net Git - vlc/commitdiff
demux: ts: fix program cross PCR regression
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 5 Feb 2015 18:54:12 +0000 (19:54 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 5 Feb 2015 18:58:17 +0000 (19:58 +0100)
modules/demux/ts.c

index e16f3427bba4d1b79ba9306fe3041d06ed1cb14d..5479c3a22e942d86c5865a2d47ec98147b6d66a1 100644 (file)
@@ -2741,9 +2741,9 @@ static void PCRHandle( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
         p_sys->i_current_pcr = i_pcr;
 
     /* Search program and set the PCR */
-    int i_group = -1;
-    for( int i = 0; i < p_sys->i_pmt && i_group < 0 ; i++ )
+    for( int i = 0; i < p_sys->i_pmt; i++ )
     {
+        int i_group = -1;
         for( int i_prg = 0; i_prg < p_sys->pmt[i]->psi->i_prg; i_prg++ )
         {
             ts_prg_psi_t *p_prg = p_sys->pmt[i]->psi->prg[i_prg];