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>
pull/175/head
Alex Agranovsky 9 years ago committed by Michael Niedermayer
parent 5edd1f62ca
commit ddda2cc43c
  1. 4
      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--;

Loading…
Cancel
Save