[FFmpeg-cvslog] r30246 - trunk/libswscale/swscale.c

reimar subversion
Fri Jan 8 20:31:33 CET 2010


Author: reimar
Date: Fri Jan  8 20:31:33 2010
New Revision: 30246

Log:
Ignore 0-height slice in sws_scale, otherwise a final 0-height slice will
cause libswscale to assume the incorrect slice order and complain about
slices starting in the middle.

Modified:
   trunk/libswscale/swscale.c

Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c	Fri Jan  8 20:21:14 2010	(r30245)
+++ trunk/libswscale/swscale.c	Fri Jan  8 20:31:33 2010	(r30246)
@@ -2966,6 +2966,10 @@ int sws_scale(SwsContext *c, uint8_t* sr
     uint8_t* src2[4]= {src[0], src[1], src[2], src[3]};
     uint8_t* dst2[4]= {dst[0], dst[1], dst[2], dst[3]};
 
+    // do not mess up sliceDir if we have a "trailing" 0-size slice
+    if (srcSliceH == 0)
+        return 0;
+
     if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) {
         av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n");
         return 0;



More information about the ffmpeg-cvslog mailing list