]> git.sesse.net Git - vlc/commitdiff
Increased probing size for ac3/dts in wav (close #3298).
authorLaurent Aimar <fenrir@videolan.org>
Sun, 14 Feb 2010 15:28:17 +0000 (16:28 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 14 Feb 2010 15:32:33 +0000 (16:32 +0100)
modules/demux/mpeg/es.c

index 0d6334578ccea1d3a72bd6ae903a300ccab04e3a..98fca75132345d19dfe0b257383cec7e48bf0759 100644 (file)
@@ -529,10 +529,9 @@ static int GenericProbe( demux_t *p_demux, int64_t *pi_offset,
 
     /* peek the begining
      * It is common that wav files have some sort of garbage at the begining
-     * We suppose that 8000 will be larger than any frame (for which pf_check
-     * return a size).
+     * We will accept probing 0.5s of data in this case.
      */
-    const int i_probe = i_skip + i_check_size + 8000 + ( b_wav ? 8000 : 0);
+    const int i_probe = i_skip + i_check_size + 8000 + ( b_wav ? (44000/2*2*2) : 0);
     const int i_peek = stream_Peek( p_demux->s, &p_peek, i_probe );
     if( i_peek < i_skip + i_check_size )
     {