aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/huffyuv.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-14 16:07:03 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-12-02 17:40:40 -0500
commit560f773c7ddd17f66e2621222980c1359a9027be (patch)
treef4f410aa8b692a0ebe713f72d4c13018f053c455 /libavcodec/huffyuv.c
parent9b9815eec4231d9efea7cd5c6a18c09c2ebff310 (diff)
downloadffmpeg-560f773c7ddd17f66e2621222980c1359a9027be.tar.gz
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.
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r--libavcodec/huffyuv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 865bc6ab5c..57b5f32fc8 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -921,8 +921,8 @@ static int encode_bgr_bitstream(HYuvContext *s, int count){
#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
static void draw_slice(HYuvContext *s, int y){
- int h, cy;
- int offset[4];
+ int h, cy, i;
+ int offset[AV_NUM_DATA_POINTERS];
if(s->avctx->draw_horiz_band==NULL)
return;
@@ -939,7 +939,8 @@ static void draw_slice(HYuvContext *s, int y){
offset[0] = s->picture.linesize[0]*y;
offset[1] = s->picture.linesize[1]*cy;
offset[2] = s->picture.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->picture, offset, y, 3, h);