[FFmpeg-cvslog] lavf/mpjpegdec: Return 0 if an allocation inside the probe function fails.

Carl Eugen Hoyos git at videolan.org
Thu Oct 22 11:23:44 CEST 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Oct 22 11:19:45 2015 +0200| [c52c78cc568f60929a0e1752f1c36123860f326e] | committer: Carl Eugen Hoyos

lavf/mpjpegdec: Return 0 if an allocation inside the probe function fails.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c52c78cc568f60929a0e1752f1c36123860f326e
---

 libavformat/mpjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index c76ea56..d4b200e 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;
 



More information about the ffmpeg-cvslog mailing list