mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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;
|
||||
|
||||
for (p = 0; p < 4; p++) {
|
||||
int srcstr = srcStride[p] >> 1;
|
||||
int dststr = dstStride[p] >> 1;
|
||||
int srcstr = srcStride[p] / 2;
|
||||
int dststr = dstStride[p] / 2;
|
||||
uint16_t *dstPtr = (uint16_t *) dst[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)
|
||||
continue;
|
||||
for (i = 0; i < (srcSliceH >> c->chrDstVSubSample); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user