mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
omxvideoenc: fix startup race condition
The reset function shouldn't start the src pad loop if it wasn't started before. Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
0a8cfcde87
commit
4e4f093319
1 changed files with 3 additions and 0 deletions
|
@ -1340,6 +1340,9 @@ gst_omx_video_enc_reset (GstVideoEncoder * encoder, gboolean hard)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Resetting encoder");
|
||||
|
||||
if (gst_omx_component_get_state (self->enc, 0) == OMX_StateLoaded)
|
||||
return TRUE;
|
||||
|
||||
gst_omx_port_set_flushing (self->enc_in_port, 5 * GST_SECOND, TRUE);
|
||||
gst_omx_port_set_flushing (self->enc_out_port, 5 * GST_SECOND, TRUE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue