summaryrefslogtreecommitdiff
path: root/libavformat/mpjpegdec.c
diff options
context:
space:
mode:
authorAlex Agranovsky <alex@sighthound.com>2015-09-12 20:34:14 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-13 03:08:50 +0200
commit276ab7c148b98ac44017ff39a8e525a1516a440e (patch)
tree67ff1f7fc4330a56e541a15ad1bb8ee5c9923c4c /libavformat/mpjpegdec.c
parent3f9fa2d0b58b142b165d4a8eaa61d7e837a76838 (diff)
avformat/mpjpegdec: Allow mpjpeg headers parsing to succeed upon EOF, if required headers are present
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mpjpegdec.c')
-rw-r--r--libavformat/mpjpegdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index b8281fc2c1..b94d088e71 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -164,8 +164,11 @@ static int parse_multipart_header(AVFormatContext *s)
char *tag, *value;
ret = get_line(s->pb, line, sizeof(line));
- if (ret < 0)
+ if (ret < 0) {
+ if (ret==AVERROR_EOF)
+ break;
return ret;
+ }
if (line[0] == '\0')
break;