From ebf8ec5b0fdc0b79602312feecbe9f1797e90033 Mon Sep 17 00:00:00 2001 From: Stephen Hutchinson Date: Tue, 30 Aug 2016 20:26:08 -0400 Subject: [PATCH] avisynth: fix Planar RGB output Signed-off-by: Michael Niedermayer (cherry picked from commit bf14393635559640f10001fa6af46130cb35fa31) Signed-off-by: Michael Niedermayer --- libavformat/avisynth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 1fe8e083be..1acc44f4c5 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -690,8 +690,10 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt, #ifdef USING_AVISYNTH /* Flip Planar RGB video. */ if (avsplus && (avs_library.avs_is_planar_rgb(avs->vi) || - avs_library.avs_is_planar_rgba(avs->vi))) + avs_library.avs_is_planar_rgba(avs->vi))) { + src_p = src_p + (planeheight - 1) * pitch; pitch = -pitch; + } #endif avs_library.avs_bit_blt(avs->env, dst_p, rowsize, src_p, pitch,