diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-22 22:47:27 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-26 13:56:59 +0100 |
commit | 10d059bb24eb88157e071a3db102ddd8f4937a00 (patch) | |
tree | 4e7e64f3cb8c97c7b96bec39fecdc30b2f155dfe /libavcodec/dnxhdenc.c | |
parent | 37f76c81d6669033c315354a7d30ef6e605414ae (diff) | |
download | ffmpeg-10d059bb24eb88157e071a3db102ddd8f4937a00.tar.gz |
avcodec/dnxhd: Make ff_dxnhd_get_cid_table return a pointer, not index
All callers only use the index into ff_dnxhd_cid_table to get a pointer
to the desired entry.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r-- | libavcodec/dnxhdenc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 0144797d1b..2461c51727 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -351,7 +351,7 @@ static av_cold int dnxhd_init_rc(DNXHDEncContext *ctx) static av_cold int dnxhd_encode_init(AVCodecContext *avctx) { DNXHDEncContext *ctx = avctx->priv_data; - int i, index, ret; + int i, ret; switch (avctx->pix_fmt) { case AV_PIX_FMT_YUV422P: @@ -411,10 +411,8 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - index = ff_dnxhd_get_cid_table(ctx->cid); - av_assert0(index >= 0); - - ctx->cid_table = &ff_dnxhd_cid_table[index]; + ctx->cid_table = ff_dnxhd_get_cid_table(ctx->cid); + av_assert0(ctx->cid_table); ctx->m.avctx = avctx; ctx->m.mb_intra = 1; |