va: vp9enc: Fix the frame size not enough issue for super frame

The current code forgets to add the current last frame size into
the total super frame size.

Fixes: #3427
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6483>
This commit is contained in:
He Junyan 2024-03-29 18:08:54 +08:00 committed by Víctor Manuel Jáquez Leal
parent 249a086612
commit 2560f4c581

View file

@ -2514,7 +2514,7 @@ _vp9_create_super_frame_output_buffer (GstVaVp9Enc * self,
g_assert ((_enc_frame (last_frame)->flags & FRAME_FLAG_NOT_SHOW) == 0);
g_assert (self->frames_in_super_num <= GST_VP9_MAX_FRAMES_IN_SUPERFRAME - 1);
total_sz = self->frames_in_super_num * base->codedbuf_size;
total_sz = (self->frames_in_super_num + 1) * base->codedbuf_size;
data = g_malloc (total_sz);
if (!data)