commit 0a603cdaf5cf5d6dd722fe5556c278ce726683b9
Author: Alex Agranovsky <alex@sighthound.com>
Date:   Sat Sep 12 20:28:33 2015 -0400

    Allow mpjpeg headers parsing to succeed upon EOF, if required headers are present

diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index ce6de0e..868fab1 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -190,8 +190,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;
