From c52c78cc568f60929a0e1752f1c36123860f326e Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 22 Oct 2015 11:19:45 +0200 Subject: [PATCH] lavf/mpjpegdec: Return 0 if an allocation inside the probe function fails. --- libavformat/mpjpegdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c index c76ea560e7..d4b200e9c5 100644 --- a/libavformat/mpjpegdec.c +++ b/libavformat/mpjpegdec.c @@ -98,7 +98,7 @@ static int mpjpeg_read_probe(AVProbeData *p) pb = avio_alloc_context(p->buf, p->buf_size, 0, NULL, NULL, NULL, NULL); if (!pb) - return AVERROR(ENOMEM); + return 0; ret = (parse_multipart_header(pb, NULL)>0)?AVPROBE_SCORE_MAX:0;