From fbb82370e75217bbb3a449d884b95091e9aaa59b Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Escudier?= Date: Wed, 19 Jun 2013 20:43:49 +0000 Subject: [PATCH] mjpeg : remove optional quotes from MIME boundary --- modules/demux/mjpeg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c index 2ae4ec79d2..8def7f809a 100644 --- a/modules/demux/mjpeg.c +++ b/modules/demux/mjpeg.c @@ -322,7 +322,15 @@ static int Open( vlc_object_t * p_this ) char* boundary = strstr( content_type, "boundary=" ); if( boundary ) { - p_sys->psz_separator = strdup( boundary + strlen("boundary=") ); + boundary += strlen( "boundary=" ); + size_t len = strlen( boundary ); + if( len > 2 && boundary[0] == '"' + && boundary[len-1] == '"' ) + { + boundary[len-1] = '\0'; + boundary++; + } + p_sys->psz_separator = strdup( boundary ); if( !p_sys->psz_separator ) { free( content_type ); -- 2.39.2