[FFmpeg-cvslog] dnxhddata_ Fix mixup of sizeof() and array elements in ff_dnxhd_find_cid()

Michael Niedermayer git at videolan.org
Thu Oct 25 21:29:20 CEST 2012


ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 22:36:15 2012 +0200| [400b23beab0ab049152e276996a2a405b5542a02] | committer: Michael Niedermayer

dnxhddata_ Fix mixup of sizeof() and array elements in ff_dnxhd_find_cid()

Fixes CID717910
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 1037e484f0f1c45ab0a398c78985d3b91daa410c)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=400b23beab0ab049152e276996a2a405b5542a02
---

 libavcodec/dnxhddata.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c
index 948a4c6..da6260e 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;
             }



More information about the ffmpeg-cvslog mailing list