aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-01-08 19:31:33 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-01-08 19:31:33 +0000
commit1b168a428d0f401261484f39eeb007cb5430130c (patch)
tree4786ed5ecb837baefd8492a6a076c123a0e38d9e
parent7213abf6ba6b6ad00f69db2859c3a4cd6a7f71d8 (diff)
downloadffmpeg-1b168a428d0f401261484f39eeb007cb5430130c.tar.gz
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. Originally committed as revision 30246 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r--libswscale/swscale.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index f4a65b2c85..0a989cafe9 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2966,6 +2966,10 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
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;