From ddda2cc43c85d466fe53926d7e3c8a78dde2fcda Mon Sep 17 00:00:00 2001 From: Alex Agranovsky Date: Sat, 13 Feb 2016 23:16:45 -0500 Subject: lavf/mpjpeg: do not include CRLF preceding boundary as part of the returned frame Signed-off-by: Alex Agranovsky Signed-off-by: Michael Niedermayer --- libavformat/mpjpegdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/mpjpegdec.c') diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c index 3446f2a4f1..7a6bbe491b 100644 --- a/libavformat/mpjpegdec.c +++ b/libavformat/mpjpegdec.c @@ -351,8 +351,8 @@ static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt) do { if (!memcmp(start, mpjpeg->searchstr, mpjpeg->searchstr_len)) { // got the boundary! rewind the stream - avio_seek(s->pb, -(len-2), SEEK_CUR); - pkt->size -= (len-2); + avio_seek(s->pb, -len, SEEK_CUR); + pkt->size -= len; return pkt->size; } len--; -- cgit v1.2.3