summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_scale.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-29 14:46:59 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-29 14:46:59 +0000
commit49e2373fe76d678363fbf0089c028ef7801480ea (patch)
treee9acbe119dbf1028ac70814734c912bf1cd6ca3f /libmpcodecs/vf_scale.c
parent8fec98cef22002ae7fb6618426043fc6c3906aca (diff)
downloadmpv-49e2373fe76d678363fbf0089c028ef7801480ea.tar.bz2
mpv-49e2373fe76d678363fbf0089c028ef7801480ea.tar.xz
Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays in libmpcodecs.
This might avoid some issues since sws_scale in some cases assumes these have at least 4 valid entries. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29103 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_scale.c')
-rw-r--r--libmpcodecs/vf_scale.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index b6c683c430..9b94013de4 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -319,9 +319,9 @@ static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){
vf->priv->w, vf->priv->h);
}
-static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[3], int src_stride[3], int y, int h,
- uint8_t *dst[3], int dst_stride[3], int interlaced){
- uint8_t *src2[3]={src[0], src[1], src[2]};
+static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[MP_MAX_PLANES], int src_stride[MP_MAX_PLANES],
+ int y, int h, uint8_t *dst[MP_MAX_PLANES], int dst_stride[MP_MAX_PLANES], int interlaced){
+ uint8_t *src2[MP_MAX_PLANES]={src[0], src[1], src[2]};
#ifdef WORDS_BIGENDIAN
uint32_t pal2[256];
if (src[1] && !src[2]){
@@ -334,9 +334,9 @@ static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src
if(interlaced){
int i;
- uint8_t *dst2[3]={dst[0], dst[1], dst[2]};
- int src_stride2[3]={2*src_stride[0], 2*src_stride[1], 2*src_stride[2]};
- int dst_stride2[3]={2*dst_stride[0], 2*dst_stride[1], 2*dst_stride[2]};
+ uint8_t *dst2[MP_MAX_PLANES]={dst[0], dst[1], dst[2]};
+ int src_stride2[MP_MAX_PLANES]={2*src_stride[0], 2*src_stride[1], 2*src_stride[2]};
+ int dst_stride2[MP_MAX_PLANES]={2*dst_stride[0], 2*dst_stride[1], 2*dst_stride[2]};
sws_scale_ordered(sws1, src2, src_stride2, y>>1, h>>1, dst2, dst_stride2);
for(i=0; i<3; i++){