diff options
author | Alex Agranovsky <alex@sighthound.com> | 2016-02-12 12:59:29 -0500 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-14 12:31:08 +0100 |
commit | 09b8e97ab62d4c83cf892cfdd49e2c28a9a41eba (patch) | |
tree | cbfe4ae2bc9c8f7e4ab8052f3d5f459702b27b16 | |
parent | a573e6c10371bf3e3cf7e9c22abe3c07cc1c2a45 (diff) | |
download | ffmpeg-09b8e97ab62d4c83cf892cfdd49e2c28a9a41eba.tar.gz |
lavf/mpjpeg: Trim quotes on MIME boundary, if present.
Fixes 5023
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mpjpegdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c index c9fcf47f1e..3446f2a4f1 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; } |