[rygel] engine-gst: Guard read access to critical section



commit f278cc5216f3b4f30b1cb8fb0d77f11d6c915264
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Sep 9 11:56:47 2014 +0200

    engine-gst: Guard read access to critical section
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734358

 src/media-engines/gstreamer/rygel-gst-sink.vala |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-sink.vala b/src/media-engines/gstreamer/rygel-gst-sink.vala
index 9620a5c..1f21a40 100644
--- a/src/media-engines/gstreamer/rygel-gst-sink.vala
+++ b/src/media-engines/gstreamer/rygel-gst-sink.vala
@@ -88,13 +88,13 @@ internal class Rygel.GstSink : Sink {
     }
 
     public void thaw () {
-        if (!this.frozen) {
-            return;
+        this.buffer_mutex.lock ();
+
+        if (this.frozen) {
+            this.frozen = false;
+            this.buffer_condition.broadcast ();
         }
 
-        this.buffer_mutex.lock ();
-        this.frozen = false;
-        this.buffer_condition.broadcast ();
         this.buffer_mutex.unlock ();
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]