From 560f773c7ddd17f66e2621222980c1359a9027be Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 14 Nov 2011 16:07:03 -0500 Subject: avcodec: change number of plane pointers from 4 to 8 at next major bump. Add AV_NUM_DATA_POINTERS to simplify the bump transition. This will allow for supporting more planar audio channels without having to allocate separate pointer arrays. --- libavcodec/vp3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libavcodec/vp3.c') diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index a31ad4e99f..6e04b7b01b 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1331,8 +1331,8 @@ end: */ static void vp3_draw_horiz_band(Vp3DecodeContext *s, int y) { - int h, cy; - int offset[4]; + int h, cy, i; + int offset[AV_NUM_DATA_POINTERS]; if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_FRAME) { int y_flipped = s->flipped_image ? s->avctx->height-y : y; @@ -1358,7 +1358,8 @@ static void vp3_draw_horiz_band(Vp3DecodeContext *s, int y) offset[0] = s->current_frame.linesize[0]*y; offset[1] = s->current_frame.linesize[1]*cy; offset[2] = s->current_frame.linesize[2]*cy; - offset[3] = 0; + for (i = 3; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; emms_c(); s->avctx->draw_horiz_band(s->avctx, &s->current_frame, offset, y, 3, h); -- cgit v1.2.3