]> git.sesse.net Git - vlc/commitdiff
demux: mpeg: avoid false positives with WAVE/dts (fix #13866)
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 10 Feb 2015 18:02:01 +0000 (19:02 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 10 Feb 2015 18:04:15 +0000 (19:04 +0100)
modules/demux/mpeg/es.c

index e2b759d4961a1cb741e220974833d5c9f04640e5..f199f45877a5aa21ebf78e151bc0f55976820e18 100644 (file)
@@ -654,7 +654,12 @@ static int GenericProbe( demux_t *p_demux, int64_t *pi_offset,
             for( int t = 0; t < 1 + !!b_wav; t++ )
             {
                 if( t == 1 )
+                {
+                    if(!i_samples)
+                        break;
                     i_size = i_samples * 2 * 2;
+                }
+
                 if( i_skip + i_check_size + i_size <= i_peek )
                 {
                     b_ok = pf_check( &p_peek[i_skip+i_size], NULL ) >= 0;