avcodec/cdxl: fix decoding with AVFrame's negative linesize

This commit is contained in:
Paul B Mahol 2023-09-22 23:10:51 +02:00
parent 24f63cb2b7
commit 445167d5fd
1 changed files with 3 additions and 2 deletions

View File

@ -125,9 +125,10 @@ static void chunky2chunky(CDXLVideoContext *c, int linesize, uint8_t *out)
}
}
static void import_format(CDXLVideoContext *c, int linesize, uint8_t *out)
static void import_format(CDXLVideoContext *c, ptrdiff_t linesize, uint8_t *out)
{
memset(out, 0, linesize * c->avctx->height);
for (int y = 0; y < c->avctx->height; y++)
memset(out + y * linesize, 0, c->avctx->width);
switch (c->format) {
case BIT_PLANAR: