[FFmpeg-cvslog] avcodec/flac_parser: Raise threshold for detecting invalid data

Michael Niedermayer git at videolan.org
Sat Aug 13 16:30:03 EEST 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jun 22 20:19:40 2016 +0200| [96ce6f64cc33e7d599d9b98e15d9fc2e3e28cb69] | committer: Michael Niedermayer

avcodec/flac_parser: Raise threshold for detecting invalid data

Fixes regression from Ticket5428

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit b0b3676e136a09a13767859f429a0aa416d929cd)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96ce6f64cc33e7d599d9b98e15d9fc2e3e28cb69
---

 libavcodec/flac_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index 3723716..183fe6e 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -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;



More information about the ffmpeg-cvslog mailing list