[FFmpeg-cvslog] lavf/mpjpeg: Trim quotes on MIME boundary, if present.

Alex Agranovsky git at videolan.org
Sun Feb 14 13:17:30 CET 2016


ffmpeg | branch: master | Alex Agranovsky <alex at sighthound.com> | Fri Feb 12 12:59:29 2016 -0500| [09b8e97ab62d4c83cf892cfdd49e2c28a9a41eba] | committer: Michael Niedermayer

lavf/mpjpeg: Trim quotes on MIME boundary, if present.

Fixes 5023

Signed-off-by: Alex Agranovsky <alex at sighthound.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09b8e97ab62d4c83cf892cfdd49e2c28a9a41eba
---

 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;
         }



More information about the ffmpeg-cvslog mailing list