vlc | branch: master | Sébastien Escudier <[email protected]> | Wed Jun 19 20:43:49 2013 +0000| [fbb82370e75217bbb3a449d884b95091e9aaa59b] | committer: Sébastien Escudier
mjpeg : remove optional quotes from MIME boundary > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbb82370e75217bbb3a449d884b95091e9aaa59b --- 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 2ae4ec7..8def7f8 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 ); _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
