[FFmpeg-cvslog] lavf/mpjpeg: do not include CRLF preceding boundary as part of the returned frame

Alex Agranovsky git at videolan.org
Sun Feb 14 14:53:48 CET 2016


ffmpeg | branch: master | Alex Agranovsky <alex at sighthound.com> | Sat Feb 13 23:16:45 2016 -0500| [ddda2cc43c85d466fe53926d7e3c8a78dde2fcda] | committer: Michael Niedermayer

lavf/mpjpeg: do not include CRLF preceding boundary as part of the returned frame

Signed-off-by: Alex Agranovsky <alex at sighthound.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mpjpegdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 3446f2a..7a6bbe4 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--;



More information about the ffmpeg-cvslog mailing list