Browse Source

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>
tags/n3.0
Alex Agranovsky Michael Niedermayer 10 years ago
parent
commit
09b8e97ab6
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavformat/mpjpegdec.c

+ 7
- 0
libavformat/mpjpegdec.c View File

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


Loading…
Cancel
Save