aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-11-11 13:27:03 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-13 01:41:25 +0100
commite3f50f247155216229e34f165bae8c329d5a001e (patch)
treec749377005854c2dacdd6371742d86540b346a66
parentb1b1a7370e141c912e3d0bbaa668dcee05c3ad67 (diff)
downloadffmpeg-e3f50f247155216229e34f165bae8c329d5a001e.tar.gz
dnxhdenc: check negative index
CC: libav-stable@libav.org Bug-Id: CID 700464
-rw-r--r--libavcodec/dnxhdenc.c2
1 files changed, 2 insertions, 0 deletions
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;