[FFmpeg-cvslog] avcodec/mpegvideo_enc: Don't apply non-zero offset to null pointer
Andreas Rheinhardt
git at videolan.org
Sat Apr 3 01:18:28 EEST 2021
ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Mar 26 07:15:56 2021 +0100| [09510d9ffd91d1b734d8099884dfb916069b4f2e] | committer: Andreas Rheinhardt
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 at gmail.com>
(cherry picked from commit 4863671d888273392e9dcc2429f3852c00330498)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09510d9ffd91d1b734d8099884dfb916069b4f2e
---
libavcodec/mpegvideo_enc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 7eecfce27c..a095062052 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list