comparison libswscale/swscale.c @ 30204:2b19714f79d2

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.
author reimar
date Fri, 08 Jan 2010 19:31:33 +0000
parents bd9db1814611
children 5788ae4c1e89
comparison
equal deleted inserted replaced
30203:3888e3862fe0 30204:2b19714f79d2
2964 { 2964 {
2965 int i; 2965 int i;
2966 uint8_t* src2[4]= {src[0], src[1], src[2], src[3]}; 2966 uint8_t* src2[4]= {src[0], src[1], src[2], src[3]};
2967 uint8_t* dst2[4]= {dst[0], dst[1], dst[2], dst[3]}; 2967 uint8_t* dst2[4]= {dst[0], dst[1], dst[2], dst[3]};
2968 2968
2969 // do not mess up sliceDir if we have a "trailing" 0-size slice
2970 if (srcSliceH == 0)
2971 return 0;
2972
2969 if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) { 2973 if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) {
2970 av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n"); 2974 av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n");
2971 return 0; 2975 return 0;
2972 } 2976 }
2973 if (c->sliceDir == 0) { 2977 if (c->sliceDir == 0) {