aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Agranovsky <alex@sighthound.com>2016-02-13 23:16:45 -0500
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-14 13:48:33 +0100
commitddda2cc43c85d466fe53926d7e3c8a78dde2fcda (patch)
tree535ed9d8e887c753dabaf4d1d933be1f3f27b087
parent5edd1f62ca15ad34705789f155f68ca18914d0f4 (diff)
downloadffmpeg-ddda2cc43c85d466fe53926d7e3c8a78dde2fcda.tar.gz
lavf/mpjpeg: do not include CRLF preceding boundary as part of the returned frame
Signed-off-by: Alex Agranovsky <alex@sighthound.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mpjpegdec.c4
1 files changed, 2 insertions, 2 deletions
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--;