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
@ -660,9 +660,12 @@ gst_va_base_enc_handle_frame (GstVideoEncoder * venc,
|
|||||||
if (ret != GST_FLOW_OK)
|
if (ret != GST_FLOW_OK)
|
||||||
goto error_encode;
|
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);
|
ret = _push_out_one_buffer (base);
|
||||||
|
|
||||||
|
if (ret != GST_FLOW_OK)
|
||||||
|
goto error_push_buffer;
|
||||||
|
|
||||||
frame_encode = NULL;
|
frame_encode = NULL;
|
||||||
if (!base_class->reorder_frame (base, NULL, FALSE, &frame_encode))
|
if (!base_class->reorder_frame (base, NULL, FALSE, &frame_encode))
|
||||||
goto error_reorder;
|
goto error_reorder;
|
||||||
@ -706,6 +709,12 @@ error_encode:
|
|||||||
gst_video_encoder_finish_frame (venc, frame_encode);
|
gst_video_encoder_finish_frame (venc, frame_encode);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
error_push_buffer:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
|
||||||
|
("Failed to push one frame."), (NULL));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user