From: Paul Brossier Date: Mon, 28 Jan 2013 22:52:51 +0000 (-0500) Subject: timeside/decoder/core.py: improve use of condition X-Git-Tag: 0.4.3~1^2~11 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8984aac77448937f42f967ae7ab49258875ab8ee;p=timeside.git timeside/decoder/core.py: improve use of condition --- diff --git a/timeside/decoder/core.py b/timeside/decoder/core.py index 725d6c1..669851d 100644 --- a/timeside/decoder/core.py +++ b/timeside/decoder/core.py @@ -139,7 +139,7 @@ class FileDecoder(Processor): self.pipeline.set_state(gst.STATE_PLAYING) self.cond.acquire() - if not self.discovered: + while not self.discovered: #print 'waiting' self.cond.wait() self.cond.release() @@ -202,8 +202,8 @@ class FileDecoder(Processor): elif t == gst.MESSAGE_ERROR: self.pipeline.set_state(gst.STATE_NULL) err, debug = message.parse_error() - self.discovered = True self.cond.acquire() + self.discovered = True self.cond.notify() self.cond.release() self.mainloop.quit()