1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/mpegvideo_enc: Don't apply non-zero offset to null pointer

Affected many FATE tests (mostly vsynth ones).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-03-26 07:15:56 +01:00 committed by Andreas Rheinhardt
parent 9eadd616b7
commit 4863671d88

View File

@ -1696,7 +1696,8 @@ no_output_pic:
// input is not a shared pix -> reuse buffer for current_pix
s->current_picture_ptr = s->reordered_input_picture[0];
for (i = 0; i < 4; i++) {
s->new_picture.f->data[i] += INPLACE_OFFSET;
if (s->new_picture.f->data[i])
s->new_picture.f->data[i] += INPLACE_OFFSET;
}
}
ff_mpeg_unref_picture(s->avctx, &s->current_picture);