diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-01-28 19:06:08 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-28 20:15:15 +0100 |
commit | 82c252972b494402818aa07df5bdbac16111c09d (patch) | |
tree | cfbb7659f003e42e7aeb52a943b6b36adb54aafb /libavcodec/adpcmenc.c | |
parent | 7b21b0f155fffa1af52e48f187415e3d58bdbae1 (diff) | |
download | ffmpeg-82c252972b494402818aa07df5bdbac16111c09d.tar.gz |
adpcmenc: check return value of avcodec_alloc_frame()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r-- | libavcodec/adpcmenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index e500a1cdbf..82cd8b5992 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -137,7 +137,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) } avctx->coded_frame = avcodec_alloc_frame(); - avctx->coded_frame->key_frame= 1; + if (!avctx->coded_frame) + goto error; return 0; error: |