This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new d85cdd2597 avcodec/cavs: check reference frame before pointer
arithmetic
d85cdd2597 is described below
commit d85cdd25970e5101fa5848a4c0972af4b966e90e
Author: Xiujun Wang <[email protected]>
AuthorDate: Tue Sep 29 01:51:44 2026 +0800
Commit: michaelni <[email protected]>
CommitDate: Tue Sep 29 10:54:54 2026 +0000
avcodec/cavs: check reference frame before pointer arithmetic
The CAVS motion compensation code computes source pointers before checking
whether the reference frame is available. Move the existing check before the
pointer arithmetic to avoid undefined behavior when a missing reference frame
is encountered.
Fixes: #24649
Signed-off-by: Xiujun Wang <[email protected]>
---
libavcodec/cavs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c
index 455f3e5d9e..9b83112a06 100644
--- a/libavcodec/cavs.c
+++ b/libavcodec/cavs.c
@@ -393,6 +393,9 @@ static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
int chroma_height,
qpel_mc_func *qpix_op,
h264_chroma_mc_func chroma_op, cavs_vector *mv)
{
+ if (!pic->data[0])
+ return;
+
const int mx = mv->x + src_x_offset * 8;
const int my = mv->y + src_y_offset * 8;
const int luma_xy = (mx & 3) + ((my & 3) << 2);
@@ -407,8 +410,6 @@ static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
int chroma_height,
const int pic_height = 16 * h->mb_height;
int emu = 0;
- if (!pic->data[0])
- return;
if (mx & 7)
extra_width -= 3;
if (my & 7)
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]