[vlc-commits] demux: mpeg: avoid false positives with WAVE/dts (fix #13866)

Francois Cartegnie git at videolan.org
Mon Feb 16 20:44:08 CET 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Feb 10 19:02:01 2015 +0100| [f6a740ff0cd9080721656f426f63919a47e4a83b] | committer: Jean-Baptiste Kempf

demux: mpeg: avoid false positives with WAVE/dts (fix #13866)

(cherry picked from commit cb4ea7cc766c1326ccd89412fab5e5621d4dd356)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f6a740ff0cd9080721656f426f63919a47e4a83b
---

 modules/demux/mpeg/es.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 5f10f69..819b89b 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -612,7 +612,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;



More information about the vlc-commits mailing list