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: