diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 42945107dd..c49ad7eb39 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -299,6 +299,8 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "cid %d\n", ctx->cid); index = ff_dnxhd_get_cid_table(ctx->cid); + if (index < 0) + return index; ctx->cid_table = &ff_dnxhd_cid_table[index]; ctx->m.avctx = avctx;