avformat/mpjpegdec: Allow mpjpeg headers parsing to succeed upon EOF, if required...
[ffmpeg.git] / 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;