[FFmpeg-cvslog] adpcmenc: check return value of avcodec_alloc_frame()
Paul B Mahol
git at videolan.org
Sat Jan 28 21:49:16 CET 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jan 28 19:06:08 2012 +0000| [82c252972b494402818aa07df5bdbac16111c09d] | committer: Michael Niedermayer
adpcmenc: 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=82c252972b494402818aa07df5bdbac16111c09d
---
libavcodec/adpcmenc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index e500a1c..82cd8b5 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:
More information about the ffmpeg-cvslog
mailing list