[FFmpeg-cvslog] lavc/mediacodec: fix chroma width for yuv420p

Matthieu Bouron git at videolan.org
Mon Mar 7 14:43:52 CET 2016


ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at stupeflix.com> | Mon Mar  7 14:31:25 2016 +0100| [8c24523cc52bacae2088f70bcb3d450bcc94e5e6] | committer: Matthieu Bouron

lavc/mediacodec: fix chroma width for yuv420p

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c24523cc52bacae2088f70bcb3d450bcc94e5e6
---

 libavcodec/mediacodec_sw_buffer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mediacodec_sw_buffer.c b/libavcodec/mediacodec_sw_buffer.c
index df75754..349a68d 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++) {



More information about the ffmpeg-cvslog mailing list