diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-28 20:04:54 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-04 18:01:03 +0200 |
commit | 04196852a2761b6e1d751570ef31d3a6495fd8bd (patch) | |
tree | cd7c15601055dcd7e308fc6985689aa6e4cccb14 /libavcodec/mpegvideo_dec.c | |
parent | 63b31565584e7aaef9c43ca9c0c7a44c6cbc9e97 (diff) |
avcodec/mpegvideo_dec: Fix UB NULL + 0
Affected the mpeg2-field-enc FATE-test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo_dec.c')
-rw-r--r-- | libavcodec/mpegvideo_dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 5b37e79e36..6d1edc027a 100644 --- a/libavcodec/mpegvideo_dec.c +++ b/libavcodec/mpegvideo_dec.c @@ -446,8 +446,8 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) if (s->picture_structure != PICT_FRAME) { for (int i = 0; i < 4; i++) { if (s->picture_structure == PICT_BOTTOM_FIELD) { - s->current_picture.f->data[i] += - s->current_picture.f->linesize[i]; + s->current_picture.f->data[i] = FF_PTR_ADD(s->current_picture.f->data[i], + s->current_picture.f->linesize[i]); } s->current_picture.f->linesize[i] *= 2; s->last_picture.f->linesize[i] *= 2; |