dnxhdenc: check negative index

CC: libav-stable@libav.org
Bug-Id: CID 700464
This commit is contained in:
Vittorio Giovara 2014-11-11 13:27:03 +01:00
parent b1b1a7370e
commit e3f50f2471

View File

@ -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;