vabaseenc: Fix frame leak on error path

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6703>
This commit is contained in:
Seungha Yang 2024-04-21 14:55:31 +08:00 committed by GStreamer Marge Bot
parent c013b03a19
commit b66834787c

View file

@ -637,8 +637,10 @@ gst_va_base_enc_handle_frame (GstVideoEncoder * venc,
GST_TIME_ARGS (GST_BUFFER_PTS (frame->input_buffer)));
if (g_atomic_int_compare_and_exchange (&base->reconf, TRUE, FALSE)) {
if (!gst_va_base_enc_reset (base))
if (!gst_va_base_enc_reset (base)) {
gst_video_encoder_finish_frame (venc, frame);
return GST_FLOW_ERROR;
}
}
ret = gst_va_base_enc_import_input_buffer (base,