On Sat, May 16, 2015 at 4:03 PM, Luca Barbato <[email protected]> wrote:
> Support only streams with Content-Length.
>
> Signed-off-by: Luca Barbato <[email protected]>
> ---
>
> I'd have to change ff_get_line to make it work.
The problem is that ff_get_line does not parse ^M characters right?
I don't know if it would make sense to add a parameter to that
function so that other formats may use if needed.
> libavformat/Makefile | 1 +
> libavformat/allformats.c | 2 +-
> libavformat/mpjpegdec.c | 234
> +++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 236 insertions(+), 1 deletion(-)
> create mode 100644 libavformat/mpjpegdec.c
Bump MINOR version when you push this please.
> +static int mpjpeg_read_header(AVFormatContext *s)
> +{
> + AVStream *st;
> + char boundary[70 + 2 + 1];
> + int64_t pos = avio_tell(s->pb);
> + int ret;
> +
> +
> + ret = get_line(s->pb, boundary, sizeof(boundary));
> + if (ret < 0)
> + return ret;
nit: extra line
Looks ok on a first read.
--
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel