diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 02:26:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 02:43:47 +0300 |
commit | cf9edda1d370d39bc8a3d020a9c2bc4090d2457e (patch) | |
tree | 1d1bbc529a4e8109fb6aa5cadf0dbbb7bd61013a /libmpcodecs/vf_screenshot.c | |
parent | 7af8417ae7beb409f54849956a7037bc66c4c334 (diff) | |
parent | 1c37a6427abef0827c608d328d37ca1b1a0a022d (diff) | |
download | mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.bz2 mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.xz |
Merge svn changes up to r29117
Diffstat (limited to 'libmpcodecs/vf_screenshot.c')
-rw-r--r-- | libmpcodecs/vf_screenshot.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c index cded6ad1dd..1fb37a623b 100644 --- a/libmpcodecs/vf_screenshot.c +++ b/libmpcodecs/vf_screenshot.c @@ -108,16 +108,14 @@ static void gen_fname(struct vf_priv_s* priv) static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi) { - uint8_t *dst[3]; - int dst_stride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dst_stride[MP_MAX_PLANES] = {0}; dst_stride[0] = priv->stride; - dst_stride[1] = dst_stride[2] = 0; if (!priv->buffer) priv->buffer = memalign(16, dst_stride[0]*priv->dh); dst[0] = priv->buffer; - dst[1] = dst[2] = 0; sws_scale_ordered(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride); } @@ -137,12 +135,10 @@ static void draw_slice(struct vf_instance* vf, unsigned char** src, int* stride, int w,int h, int x, int y) { if (vf->priv->store_slices) { - uint8_t *dst[3]; - int dst_stride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dst_stride[MP_MAX_PLANES] = {0}; dst_stride[0] = vf->priv->stride; - dst_stride[1] = dst_stride[2] = 0; dst[0] = vf->priv->buffer; - dst[1] = dst[2] = 0; sws_scale_ordered(vf->priv->ctx, src, stride, y, h, dst, dst_stride); } vf_next_draw_slice(vf,src,stride,w,h,x,y); |