]> git.sesse.net Git - vlc/commitdiff
TS demux: Clarify a for() loop.
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 10 Oct 2008 15:20:01 +0000 (17:20 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 10 Oct 2008 15:20:01 +0000 (17:20 +0200)
This will likely fix CID 247, which seems like a false.
I don't see how PIDClean is called twice here, I think it's a limitation in the Coverity scan logic.

modules/demux/ts.c

index 3c003eb7dc7830aadc10bb522d2fd88b068ddc87..92889d6bbc94acfe2ad436de0ac5218668637454 100644 (file)
@@ -4021,7 +4021,7 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
 
             if( !pid->b_valid || pid->psi ) continue;
 
-            for( j = 0; j < i_pmt_rm; j++ )
+            for( j = 0; j < i_pmt_rm && pid->b_valid; j++ )
             {
                 int i_prg;
                 for( i_prg = 0; i_prg < pid->p_owner->i_prg; i_prg++ )
@@ -4041,8 +4041,6 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
                     PIDClean( p_demux->out, pid );
                     break;
                 }
-
-                if( !pid->b_valid ) break;
             }
         }