From 1037e484f0f1c45ab0a398c78985d3b91daa410c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 13 Oct 2012 22:36:15 +0200 Subject: [PATCH] dnxhddata_ Fix mixup of sizeof() and array elements in ff_dnxhd_find_cid() Fixes CID717910 Signed-off-by: Michael Niedermayer --- libavcodec/dnxhddata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index c3d2204838..9e2e014b43 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -1038,7 +1038,7 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth) if (cid->width == avctx->width && cid->height == avctx->height && cid->interlaced == !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT) && cid->bit_depth == bit_depth) { - for (j = 0; j < sizeof(cid->bit_rates); j++) { + for (j = 0; j < FF_ARRAY_ELEMS(cid->bit_rates); j++) { if (cid->bit_rates[j] == mbs) return cid->cid; }