From c4bb6d301e48b0aceba0002a22db536d0fe5a6a4 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 15 Mar 2024 15:48:34 +0800 Subject: [PATCH] va: av1enc: Fix the reference number setting bug The current way will let the total reference number surplus the reference number set by the "ref-frames" property. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c index 85be833b53..a0a0b91333 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c @@ -2058,7 +2058,7 @@ _av1_generate_gop_structure (GstVaAV1Enc * self) l0++; list0--; } - if (l0 + l1 > self->gop.num_ref_frames) + if (l0 + l1 >= self->gop.num_ref_frames) break; if (list1 > 0) { @@ -2066,7 +2066,7 @@ _av1_generate_gop_structure (GstVaAV1Enc * self) list1--; } - if (l0 + l1 > self->gop.num_ref_frames) + if (l0 + l1 >= self->gop.num_ref_frames) break; }