mirror of https://git.ffmpeg.org/ffmpeg.git
sws/packed_16bpc_bswap: fix handling of negative stride
This commit is contained in:
parent
63725d158d
commit
91f4a44ff4
|
@ -324,11 +324,11 @@ static int packed_16bpc_bswap(SwsContext *c, const uint8_t *src[],
|
||||||
int i, j, p;
|
int i, j, p;
|
||||||
|
|
||||||
for (p = 0; p < 4; p++) {
|
for (p = 0; p < 4; p++) {
|
||||||
int srcstr = srcStride[p] >> 1;
|
int srcstr = srcStride[p] / 2;
|
||||||
int dststr = dstStride[p] >> 1;
|
int dststr = dstStride[p] / 2;
|
||||||
uint16_t *dstPtr = (uint16_t *) dst[p];
|
uint16_t *dstPtr = (uint16_t *) dst[p];
|
||||||
const uint16_t *srcPtr = (const uint16_t *) src[p];
|
const uint16_t *srcPtr = (const uint16_t *) src[p];
|
||||||
int min_stride = FFMIN(srcstr, dststr);
|
int min_stride = FFMIN(FFABS(srcstr), FFABS(dststr));
|
||||||
if(!dstPtr || !srcPtr)
|
if(!dstPtr || !srcPtr)
|
||||||
continue;
|
continue;
|
||||||
for (i = 0; i < (srcSliceH >> c->chrDstVSubSample); i++) {
|
for (i = 0; i < (srcSliceH >> c->chrDstVSubSample); i++) {
|
||||||
|
|
Loading…
Reference in New Issue