summaryrefslogtreecommitdiff
path: root/libavformat/mpjpegdec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-10-22 11:19:45 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-10-22 11:19:45 +0200
commitc52c78cc568f60929a0e1752f1c36123860f326e (patch)
treef4953fab5254cb75097f87534a046a055cac826b /libavformat/mpjpegdec.c
parent6debfce6a31bf5e5e1aadcf47e0ba6251815a31b (diff)
downloadffmpeg-c52c78cc568f60929a0e1752f1c36123860f326e.tar.gz
lavf/mpjpegdec: Return 0 if an allocation inside the probe function fails.
Diffstat (limited to 'libavformat/mpjpegdec.c')
-rw-r--r--libavformat/mpjpegdec.c2
1 files changed, 1 insertions, 1 deletions
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;