mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
va: encoder: Do not continue when push_buffer gets error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4359>
This commit is contained in:
parent
9e2f0ea8dc
commit
0694c4a1c3
1 changed files with 10 additions and 1 deletions
|
@ -660,9 +660,12 @@ gst_va_base_enc_handle_frame (GstVideoEncoder * venc,
|
|||
if (ret != GST_FLOW_OK)
|
||||
goto error_encode;
|
||||
|
||||
while (g_queue_get_length (&base->output_list) > 0)
|
||||
while (ret == GST_FLOW_OK && g_queue_get_length (&base->output_list) > 0)
|
||||
ret = _push_out_one_buffer (base);
|
||||
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto error_push_buffer;
|
||||
|
||||
frame_encode = NULL;
|
||||
if (!base_class->reorder_frame (base, NULL, FALSE, &frame_encode))
|
||||
goto error_reorder;
|
||||
|
@ -706,6 +709,12 @@ error_encode:
|
|||
gst_video_encoder_finish_frame (venc, frame_encode);
|
||||
return ret;
|
||||
}
|
||||
error_push_buffer:
|
||||
{
|
||||
GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
|
||||
("Failed to push one frame."), (NULL));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
Loading…
Reference in a new issue