mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/escape124: Fix segfault with negative linesizes
Use ptrdiff_t instead of unsigned for linesizes. Fixes the armovie-escape124 FATE test with negative linesizes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
fced3a17db
commit
fcfa6965e5
|
@ -178,8 +178,8 @@ static void insert_mb_into_sb(SuperBlock* sb, MacroBlock mb, unsigned index) {
|
||||||
dst[4] = mb.pixels32[1];
|
dst[4] = mb.pixels32[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void copy_superblock(uint16_t* dest, unsigned dest_stride,
|
static void copy_superblock(uint16_t* dest, ptrdiff_t dest_stride,
|
||||||
uint16_t* src, unsigned src_stride)
|
uint16_t* src, ptrdiff_t src_stride)
|
||||||
{
|
{
|
||||||
unsigned y;
|
unsigned y;
|
||||||
if (src)
|
if (src)
|
||||||
|
@ -211,7 +211,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||||
superblocks_per_row = avctx->width / 8, skip = -1;
|
superblocks_per_row = avctx->width / 8, skip = -1;
|
||||||
|
|
||||||
uint16_t* old_frame_data, *new_frame_data;
|
uint16_t* old_frame_data, *new_frame_data;
|
||||||
unsigned old_stride, new_stride;
|
ptrdiff_t old_stride, new_stride;
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue