aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2013-07-16 13:44:56 -0700
committerMichael Niedermayer <michaelni@gmx.at>2013-07-17 13:38:26 +0200
commit33968c201cc8194864b2bb2bc7c3f0867d775e02 (patch)
treef1379d494e092bb8346c2467e40e8e5afd98cd51
parent066111bf19518a9f4d836991b34dbfc5ab72a41a (diff)
downloadffmpeg-33968c201cc8194864b2bb2bc7c3f0867d775e02.tar.gz
Fixing a stride issue in VP8 Alpha encode
When encoding alpha channel in libvpx, the stride isn't set properly for the alpha encoder. Fixing it. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/libvpxenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index f5506f7e61..5f3c32a598 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -667,6 +667,9 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
v_plane = av_malloc(frame->linesize[2] * frame->height);
memset(v_plane, 0x80, frame->linesize[2] * frame->height);
rawimg_alpha->planes[VPX_PLANE_V] = v_plane;
+ rawimg_alpha->stride[VPX_PLANE_Y] = frame->linesize[0];
+ rawimg_alpha->stride[VPX_PLANE_U] = frame->linesize[1];
+ rawimg_alpha->stride[VPX_PLANE_V] = frame->linesize[2];
}
timestamp = frame->pts;
if (frame->pict_type == AV_PICTURE_TYPE_I)