aboutsummaryrefslogtreecommitdiffstats
path: root/meta-steppeeagle/recipes-multimedia/gstreamer/gstreamer1.0-omx/0011-omx-fix-two-serious-message-handling-bugs.patch
blob: 6de3b84adfea7db12286f9c1b20a3fad38d5b8c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 6d0b6813745b54eb5dd249ba4446118b21383059 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
Date: Sat, 1 Mar 2014 22:28:24 +0100
Subject: [PATCH 11/11] 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
---
 omx/gstomx.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/omx/gstomx.c b/omx/gstomx.c
index df3a8ff..b77c904 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 {
@@ -1519,8 +1518,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 {
-- 
1.7.9.5