summaryrefslogtreecommitdiff
path: root/libavcodec/mediacodec_sw_buffer.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-03-07 14:31:25 +0100
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-03-07 14:41:55 +0100
commit8c24523cc52bacae2088f70bcb3d450bcc94e5e6 (patch)
treec2e4b620f9c45c87b59fc0a3caa433885b0b5b45 /libavcodec/mediacodec_sw_buffer.c
parentf659b70eb0935e8f80ea8a9457e1bb360150df58 (diff)
lavc/mediacodec: fix chroma width for yuv420p
Diffstat (limited to 'libavcodec/mediacodec_sw_buffer.c')
-rw-r--r--libavcodec/mediacodec_sw_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mediacodec_sw_buffer.c b/libavcodec/mediacodec_sw_buffer.c
index df75754ba2..349a68d3c2 100644
--- a/libavcodec/mediacodec_sw_buffer.c
+++ b/libavcodec/mediacodec_sw_buffer.c
@@ -115,8 +115,8 @@ void ff_mediacodec_sw_buffer_copy_yuv420_planar(AVCodecContext *avctx,
if (i == 0) {
width = avctx->width;
- } else if (i == 1) {
- width = FFMIN(frame->linesize[i], FFALIGN(avctx->width, 2));
+ } else if (i >= 1) {
+ width = FFMIN(frame->linesize[i], FFALIGN(avctx->width, 2) / 2);
}
for (j = 0; j < height; j++) {