Commit 82c25297 authored by Paul B Mahol's avatar Paul B Mahol Committed by Michael Niedermayer

adpcmenc: check return value of avcodec_alloc_frame()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7b21b0f1
...@@ -137,7 +137,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) ...@@ -137,7 +137,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
} }
avctx->coded_frame = avcodec_alloc_frame(); avctx->coded_frame = avcodec_alloc_frame();
avctx->coded_frame->key_frame= 1; if (!avctx->coded_frame)
goto error;
return 0; return 0;
error: error:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment