diff options
author | Pedro Arthur <bygrandao@gmail.com> | 2015-09-25 12:17:43 -0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-08 13:15:42 +0200 |
commit | 01bf0a178d90c078d45bee22d640a53decfc56cb (patch) | |
tree | c9a1563f6a75f94a191241f8dbad62188d0759d8 | |
parent | 3cd1be970203de56fdaacfb8743f1b376d074133 (diff) | |
download | ffmpeg-01bf0a178d90c078d45bee22d640a53decfc56cb.tar.gz |
swscale: fix ticket #4877
(cherry picked from commit a8602dde5e0a9858b9cee7e3788bef8efc43d950)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libswscale/swscale.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index cdc30a252b..ac224a83ba 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -476,17 +476,18 @@ static int swscale(SwsContext *c, const uint8_t *src[], ff_init_slice_from_src(vout_slice, (uint8_t**)dst, dstStride, c->dstW, dstY, dstH, dstY >> c->chrDstVSubSample, FF_CEIL_RSHIFT(dstH, c->chrDstVSubSample)); - - hout_slice->plane[0].sliceY = lastInLumBuf + 1; - hout_slice->plane[1].sliceY = lastInChrBuf + 1; - hout_slice->plane[2].sliceY = lastInChrBuf + 1; - hout_slice->plane[3].sliceY = lastInLumBuf + 1; - - hout_slice->plane[0].sliceH = - hout_slice->plane[1].sliceH = - hout_slice->plane[2].sliceH = - hout_slice->plane[3].sliceH = 0; - hout_slice->width = dstW; + if (srcSliceY == 0) { + hout_slice->plane[0].sliceY = lastInLumBuf + 1; + hout_slice->plane[1].sliceY = lastInChrBuf + 1; + hout_slice->plane[2].sliceY = lastInChrBuf + 1; + hout_slice->plane[3].sliceY = lastInLumBuf + 1; + + hout_slice->plane[0].sliceH = + hout_slice->plane[1].sliceH = + hout_slice->plane[2].sliceH = + hout_slice->plane[3].sliceH = 0; + hout_slice->width = dstW; + } #endif for (; dstY < dstH; dstY++) { |