From 37d3e0667abd01124d783f3ca10a4aef05746a2a Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Tue, 21 Oct 2008 21:40:24 +0000 Subject: uses FF_ARRAY_ELEMS() where appropriate Originally committed as revision 15662 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dnxhddata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/dnxhddata.c') diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index c1f2671c9d..47467ff71b 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -418,7 +418,7 @@ const CIDEntry ff_dnxhd_cid_table[] = { int ff_dnxhd_get_cid_table(int cid) { int i; - for (i = 0; i < sizeof(ff_dnxhd_cid_table)/sizeof(CIDEntry); i++) + for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) if (ff_dnxhd_cid_table[i].cid == cid) return i; return -1; @@ -430,7 +430,7 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx) int mbs = avctx->bit_rate/1000000; if (!mbs) return 0; - for (i = 0; i < sizeof(ff_dnxhd_cid_table)/sizeof(CIDEntry); i++) { + for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) { const CIDEntry *cid = &ff_dnxhd_cid_table[i]; if (cid->width == avctx->width && cid->height == avctx->height && cid->interlaced == !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT) && -- cgit v1.2.3