[FFmpeg-cvslog] v210dec: check return value of avcodec_alloc_frame()

Paul B Mahol git at videolan.org
Sat Jan 28 22:24:31 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jan 28 20:25:59 2012 +0000| [70a8c796807e564b5248cbeebc1162f86f2e6137] | committer: Michael Niedermayer

v210dec: check return value of avcodec_alloc_frame()

Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/v210dec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 1af7f94..1703cee 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -58,6 +58,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     avctx->bits_per_raw_sample = 10;
 
     avctx->coded_frame         = avcodec_alloc_frame();
+    if (!avctx->coded_frame)
+        return AVERROR(ENOMEM);
 
     s->unpack_frame            = v210_planar_unpack_c;
 



More information about the ffmpeg-cvslog mailing list