diff dnxhddata.c @ 8042:e70975d5ff80 libavcodec

uses FF_ARRAY_ELEMS() where appropriate
author aurel
date Tue, 21 Oct 2008 21:40:24 +0000
parents 230d2edc5502
children 99bfffc29ab9
line wrap: on
line diff
--- a/dnxhddata.c	Mon Oct 20 16:05:29 2008 +0000
+++ b/dnxhddata.c	Tue Oct 21 21:40:24 2008 +0000
@@ -418,7 +418,7 @@
 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 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) &&