Unified · Split
| @@ -41,6 +41,8 @@ static av_cold int encode_init(AVCodecContext *avctx) · 40 unmodified lines | ||
| 41 | 41 | avctx->bits_per_raw_sample); |
| 42 | 42 | |
| 43 | 43 | avctx->coded_frame = avcodec_alloc_frame(); |
| 44 | + if (!avctx->coded_frame) | |
| 45 | + return AVERROR(ENOMEM); | |
| 44 | 46 | |
| 45 | 47 | avctx->coded_frame->key_frame = 1; |
| 46 | 48 | avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; |