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;