[FFmpeg-cvslog] v210x: check for 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:27:35 2012 +0000| [f122cbf087d5f3af346a9c84e62123bbd3ded91e] | committer: Michael Niedermayer

v210x: check for 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=f122cbf087d5f3af346a9c84e62123bbd3ded91e
---

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

diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index ec74a33..1435249 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -31,6 +31,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);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list