mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
omxvideoenc: First set ports to flushing before waiting for the srcpad streaming thread to finish
This commit is contained in:
parent
1c0396de0e
commit
be4e1e184e
1 changed files with 5 additions and 3 deletions
|
@ -996,6 +996,11 @@ gst_omx_video_enc_stop (GstBaseVideoEncoder * encoder)
|
||||||
|
|
||||||
self = GST_OMX_VIDEO_ENC (encoder);
|
self = GST_OMX_VIDEO_ENC (encoder);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (self, "Stopping encoder");
|
||||||
|
|
||||||
|
gst_omx_port_set_flushing (self->in_port, TRUE);
|
||||||
|
gst_omx_port_set_flushing (self->out_port, TRUE);
|
||||||
|
|
||||||
gst_pad_stop_task (GST_BASE_VIDEO_CODEC_SRC_PAD (encoder));
|
gst_pad_stop_task (GST_BASE_VIDEO_CODEC_SRC_PAD (encoder));
|
||||||
|
|
||||||
if (gst_omx_component_get_state (self->component, 0) > OMX_StateIdle)
|
if (gst_omx_component_get_state (self->component, 0) > OMX_StateIdle)
|
||||||
|
@ -1010,9 +1015,6 @@ gst_omx_video_enc_stop (GstBaseVideoEncoder * encoder)
|
||||||
g_cond_broadcast (self->drain_cond);
|
g_cond_broadcast (self->drain_cond);
|
||||||
g_mutex_unlock (self->drain_lock);
|
g_mutex_unlock (self->drain_lock);
|
||||||
|
|
||||||
gst_omx_port_set_flushing (self->in_port, TRUE);
|
|
||||||
gst_omx_port_set_flushing (self->out_port, TRUE);
|
|
||||||
|
|
||||||
gst_omx_component_get_state (self->component, 5 * GST_SECOND);
|
gst_omx_component_get_state (self->component, 5 * GST_SECOND);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue