]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/flac_parser: Raise threshold for detecting invalid data
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 22 Jun 2016 18:19:40 +0000 (20:19 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 22 Jun 2016 19:10:36 +0000 (21:10 +0200)
Fixes regression from Ticket5428

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/flac_parser.c

index 372371644199bdc0a38dcd73047f14b7d64a2117..183fe6e5c96ac90eef53f8ec0751fdadb000b27c 100644 (file)
@@ -617,8 +617,8 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
 
         if (!av_fifo_space(fpc->fifo_buf) &&
             av_fifo_size(fpc->fifo_buf) / FLAC_AVG_FRAME_SIZE >
-            fpc->nb_headers_buffered * 10) {
-            /* There is less than one valid flac header buffered for 10 headers
+            fpc->nb_headers_buffered * 20) {
+            /* There is less than one valid flac header buffered for 20 headers
              * buffered. Therefore the fifo is most likely filled with invalid
              * data and the input is not a flac file. */
             goto handle_error;