From f2d8bc033cc6ab6e9a42472c99bdfce8305a13db Mon Sep 17 00:00:00 2001 From: Alex Agranovsky <a...@sighthound.com> Date: Fri, 12 Feb 2016 12:59:29 -0500 Subject: [PATCH 1/3] lavf/mpjpeg: Trim quotes on MIME boundary, if present.
Fixes 5023 Signed-off-by: Alex Agranovsky <a...@sighthound.com> --- libavformat/mpjpegdec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c index c9fcf47..3446f2a 100644 --- a/libavformat/mpjpegdec.c +++ b/libavformat/mpjpegdec.c @@ -277,6 +277,13 @@ static char* mpjpeg_get_boundary(AVIOContext* pb) len = end - start - 1; else len = strlen(start); + + /* some endpoints may enclose the boundary + in Content-Type in quotes */ + if ( len>2 && *start == '"' && start[len-1] == '"' ) { + start++; + len -= 2; + } res = av_strndup(start, len); break; } -- 2.5.4 (Apple Git-61)
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel