avisynth: fix Planar RGB output
authorStephen Hutchinson <qyot27@gmail.com>
Wed, 31 Aug 2016 00:26:08 +0000 (20:26 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 27 Oct 2016 02:37:57 +0000 (04:37 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/avisynth.c

index 1fe8e08..1acc44f 100644 (file)
@@ -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,