avformat/mpjpegdec: Allow mpjpeg headers parsing to succeed upon EOF, if required...
authorAlex Agranovsky <alex@sighthound.com>
Sun, 13 Sep 2015 00:34:14 +0000 (20:34 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 13 Sep 2015 01:08:50 +0000 (03:08 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mpjpegdec.c

index b8281fc..b94d088 100644 (file)
@@ -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;