mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
omx: wait for flush complete and buffers being released when flushing
As stated in the existing comment, when flusing we should wait for OMX to send the flush command complete event AND all ports being released. We were stopping as soon as one of those condition was met. Fix a race between FillThisBufferDone/EmptyBufferDone and the flush EventCmdComplete messages. The OMX implementation is supposed to release its buffers before posting the EventCmdComplete event but the ordering isn't guaranteed as the FillThisBufferDone/EmptyBufferDone and EventHandler callbacks can be called from different threads (cf 2.7 'Thread Safety' in the spec). https://bugzilla.gnome.org/show_bug.cgi?id=789475
This commit is contained in:
parent
4c0a8a6d90
commit
4211e4c29a
1 changed files with 1 additions and 1 deletions
|
@ -1562,7 +1562,7 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
|
|||
signalled = TRUE;
|
||||
last_error = OMX_ErrorNone;
|
||||
gst_omx_component_handle_messages (comp);
|
||||
while (!port->flushed &&
|
||||
while (!port->flushed ||
|
||||
(port->buffers
|
||||
&& port->buffers->len >
|
||||
g_queue_get_length (&port->pending_buffers))) {
|
||||
|
|
Loading…
Reference in a new issue