[FFmpeg-cvslog] lavf/rawdec: Return a low score if the mjpeg probe function detected one frame.

Carl Eugen Hoyos git at videolan.org
Fri Dec 11 01:24:13 EET 2020


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Wed Dec  9 23:42:33 2020 +0100| [7ab5192260c387a10998481fe1468f1304f6ebd2] | committer: Carl Eugen Hoyos

lavf/rawdec: Return a low score if the mjpeg probe function detected one frame.

Fixes ticket #9026.

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

 libavformat/rawdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 10c37c5cb9..122afca1b6 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -208,6 +208,8 @@ static int mjpeg_probe(const AVProbeData *p)
             return AVPROBE_SCORE_EXTENSION / 2;
         return AVPROBE_SCORE_EXTENSION / 4;
     }
+    if (!nb_invalid && nb_frames)
+        return AVPROBE_SCORE_EXTENSION / 4;
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list