From 251f0bcb7be9e42af91c1beb346d752185bbcbb9 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 20 Jan 2018 16:07:25 +0100 Subject: lavf/rawdec: Also probe the last byte of mjpeg streams. Fixes ticket #6957. --- libavformat/rawdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rawdec.c') 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; ibuf_size-2; i++) { + for (i = 0; i < p->buf_size - 1; i++) { int c; if (p->buf[i] != 0xFF) continue; -- cgit v1.2.3