[FFmpeg-devel] [PATCH] Allow mpjpeg demuxer to process MIME parts which do not include Content-Length header.
wm4
nfxjfg at googlemail.com
Mon Nov 30 12:37:02 CET 2015
On Mon, 30 Nov 2015 08:41:42 +0100
Nicolas George <george at nsup.org> wrote:
> > + "Expected boundary '%s' not found, instead found a line of %lu bytes\n",
> > + expected_boundary,
> > + strlen(line));
>
> "%lu" is not correct for size_t. The correct type would be %zu, but it is
> possible that we have to use another construct to avoid bugs from microsoft
> libraries, see other instances in the code for examples.
It's used in some portable code (e.g. http.c), so it's probably fine.
> > - size = parse_content_length(value);
> > - if (size < 0)
> > - return size;
> > + *size = parse_content_length(value);
>
> Did you remove the check on purpose?
He probably did, but now that I look at this again, it seems a bit
shady. This code parses the Content-length header, and if parsing it
fails, it will now try the boundary instead. But doesn't this header
always require a numeric value if it's present at all?
More information about the ffmpeg-devel
mailing list