Message ID | CAB0OVGq16HqtaZWixrYJuEoWjpvHXU=NFJwjQ=BsU4SygoOpQg@mail.gmail.com |
---|---|
State | Accepted |
Headers | show |
On Sat, Jan 20, 2018 at 04:11:00PM +0100, Carl Eugen Hoyos wrote: > Hi! > > Attached patch fixes ticket #6957 for me, I believe > there was an off-by-one issue in the original function. > > Please comment, Carl Eugen > rawdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > 0d791c60f3d38346afea65714fee08c7fb2c16b0 0001-lavf-rawdec-Also-probe-the-last-byte-of-mjpeg-stream.patch > From 0711e0474f9a83ec47a31b8cf261cf2e6a10a35e Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos <ceffmpeg@gmail.com> > Date: Sat, 20 Jan 2018 16:07:25 +0100 > Subject: [PATCH] lavf/rawdec: Also probe the last byte of mjpeg streams. LGTM thx [...]
2018-01-21 3:39 GMT+01:00 Michael Niedermayer <michael@niedermayer.cc>: > On Sat, Jan 20, 2018 at 04:11:00PM +0100, Carl Eugen Hoyos wrote: >> Hi! >> >> Attached patch fixes ticket #6957 for me, I believe >> there was an off-by-one issue in the original function. >> >> Please comment, Carl Eugen > >> rawdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> 0d791c60f3d38346afea65714fee08c7fb2c16b0 0001-lavf-rawdec-Also-probe-the-last-byte-of-mjpeg-stream.patch >> From 0711e0474f9a83ec47a31b8cf261cf2e6a10a35e Mon Sep 17 00:00:00 2001 >> From: Carl Eugen Hoyos <ceffmpeg@gmail.com> >> Date: Sat, 20 Jan 2018 16:07:25 +0100 >> Subject: [PATCH] lavf/rawdec: Also probe the last byte of mjpeg streams. > > LGTM Patch applied. Thank you, Carl Eugen
From 0711e0474f9a83ec47a31b8cf261cf2e6a10a35e Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffmpeg@gmail.com> Date: Sat, 20 Jan 2018 16:07:25 +0100 Subject: [PATCH] lavf/rawdec: Also probe the last byte of mjpeg streams. Fixes ticket #6957. --- libavformat/rawdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index e926549..b38a4b5 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; -- 1.7.10.4