[FFmpeg-cvslog] lavf/rawdec: Also probe the last byte of mjpeg streams.

Carl Eugen Hoyos git at videolan.org
Sun Jan 21 04:48:49 EET 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sat Jan 20 16:07:25 2018 +0100| [251f0bcb7be9e42af91c1beb346d752185bbcbb9] | committer: Carl Eugen Hoyos

lavf/rawdec: Also probe the last byte of mjpeg streams.

Fixes ticket #6957.

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

 libavformat/rawdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index e926549a60..b38a4b5e5d 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -130,7 +130,7 @@ static int mjpeg_probe(AVProbeData *p)
     int nb_invalid = 0;
     int nb_frames = 0;
 
-    for (i=0; i<p->buf_size-2; i++) {
+    for (i = 0; i < p->buf_size - 1; i++) {
         int c;
         if (p->buf[i] != 0xFF)
             continue;



More information about the ffmpeg-cvslog mailing list