Commit b95b8e5a authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit '18f9308e'

* commit '18f9308e':
  mpjpeg: Cope with multipart lacking the initial CRLF
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents 7daac500 18f9308e
......@@ -153,10 +153,20 @@ static int parse_multipart_header(AVIOContext *pb, void *log_ctx)
int found_content_type = 0;
int ret, size = -1;
// get the CRLF as empty string
ret = get_line(pb, line, sizeof(line));
if (ret < 0)
return ret;
/* some implementation do not provide the required
* initial CRLF (see rfc1341 7.2.1)
*/
if (!line[0]) {
ret = get_line(pb, line, sizeof(line));
if (ret < 0)
return ret;
}
if (strncmp(line, "--", 2))
return AVERROR_INVALIDDATA;
......@@ -216,9 +226,6 @@ static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0)
return ret;
// trailing empty line
avio_skip(s->pb, 2);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment