summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-03-01 22:28:24 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-03-02 12:09:59 +0100
commit8b06b07f6fdff4612d404eb99268c7a7325179b6 (patch)
treefa4939c206cbd3e33f231c4d6348b160c8386750
parent4e4f093319e9f28d242f42b4fee3a1ae1157920d (diff)
omx: fix two serious message handling bugs
Waiting for the next message if we already got one is nonsense and can lead to lockups. https://bugzilla.gnome.org/show_bug.cgi?id=725468
-rw-r--r--omx/gstomx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 4e94712..9157b78 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -842,8 +842,7 @@ gst_omx_component_get_state (GstOMXComponent * comp, GstClockTime timeout)
g_mutex_unlock (&comp->lock);
if (!g_queue_is_empty (&comp->messages)) {
signalled = TRUE;
- }
- if (timeout == GST_CLOCK_TIME_NONE) {
+ } else if (timeout == GST_CLOCK_TIME_NONE) {
g_cond_wait (&comp->messages_cond, &comp->messages_lock);
signalled = TRUE;
} else {
@@ -1514,8 +1513,7 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
if (!g_queue_is_empty (&comp->messages)) {
signalled = TRUE;
- }
- if (timeout == GST_CLOCK_TIME_NONE) {
+ } else if (timeout == GST_CLOCK_TIME_NONE) {
g_cond_wait (&comp->messages_cond, &comp->messages_lock);
signalled = TRUE;
} else {