From 89025f0206c89e9c49061c559897842e704f4171 Mon Sep 17 00:00:00 2001 From: lambdadroid Date: Tue, 4 Jul 2017 11:29:50 +0200 Subject: [PATCH] Fix green video when scaling video Not sure if this was changed in the newer FFMPEG version, but sws_scale now takes the srcSliceY and srcSliceH. Currently, the final height was given in instead of the source height, resulting in an error. --- omx/SoftFFmpegVideo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omx/SoftFFmpegVideo.cpp b/omx/SoftFFmpegVideo.cpp index f4386cb..4fdf5ae 100644 --- a/omx/SoftFFmpegVideo.cpp +++ b/omx/SoftFFmpegVideo.cpp @@ -610,7 +610,7 @@ int32_t SoftFFmpegVideo::drainOneOutputBuffer() { return ERR_SWS_FAILED; } sws_scale(mImgConvertCtx, mFrame->data, mFrame->linesize, - 0, height, data, linesize); + 0, mFrame->height, data, linesize); outHeader->nOffset = 0; outHeader->nFilledLen = (outputBufferWidth() * outputBufferHeight() * 3) / 2; -- 2.11.0