Skip to content

Commit ff1c45c

Browse files
Benjamin Gaignardgregkh
Benjamin Gaignard
authored andcommitted
media: verisilicon: av1: Fix reference video buffer pointer assignment
commit 672f24e upstream. Always get new destination buffer for reference frame because nothing garantees the one set previously is still valid or unused. Fixes this chromium test suite: https://chromium.googlesource.com/chromium/src/media/+/refs/heads/main/test/data/test-25fps.av1.ivf Fixes: 727a400 ("media: verisilicon: Add Rockchip AV1 decoder") Cc: <[email protected]> Signed-off-by: Benjamin Gaignard <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: fix typo and add link to chromium test suite] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4f0904a commit ff1c45c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ static int rockchip_vpu981_av1_dec_frame_ref(struct hantro_ctx *ctx,
161161
av1_dec->frame_refs[i].timestamp = timestamp;
162162
av1_dec->frame_refs[i].frame_type = frame->frame_type;
163163
av1_dec->frame_refs[i].order_hint = frame->order_hint;
164-
if (!av1_dec->frame_refs[i].vb2_ref)
165-
av1_dec->frame_refs[i].vb2_ref = hantro_get_dst_buf(ctx);
164+
av1_dec->frame_refs[i].vb2_ref = hantro_get_dst_buf(ctx);
166165

167166
for (j = 0; j < V4L2_AV1_TOTAL_REFS_PER_FRAME; j++)
168167
av1_dec->frame_refs[i].order_hints[j] = frame->order_hints[j];

0 commit comments

Comments
 (0)