[FFmpeg-cvslog] avcodec/mjpeg_parser: Adjust size rejection threshold

Michael Niedermayer git at videolan.org
Fri Jul 10 21:28:07 EEST 2020


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 10 00:31:16 2020 +0200| [dde60772970ed663b85d475e741013a0222decda] | committer: Michael Niedermayer

avcodec/mjpeg_parser: Adjust size rejection threshold

Fixes: 86987846-429c8d80-c197-11ea-916b-bb4738e09687.jpg
Fixes: Regression since ec3d8a0e6945fe015d16cd98a1e7dbb4be815c15

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

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

 libavcodec/mjpeg_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c
index c642b2ecbc..f54fdd37cb 100644
--- a/libavcodec/mjpeg_parser.c
+++ b/libavcodec/mjpeg_parser.c
@@ -82,7 +82,7 @@ static int find_frame_end(MJPEGParserContext *m, const uint8_t *buf, int buf_siz
                     return i-3;
                 } else if(state<0xFFD00000 || state>0xFFD9FFFF){
                     m->size= (state&0xFFFF)-1;
-                    if (m->size >= 0x8000)
+                    if (m->size >= 0xF000)
                         m->size = 0;
                 }
             }



More information about the ffmpeg-cvslog mailing list