From 8984aac77448937f42f967ae7ab49258875ab8ee Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 28 Jan 2013 17:52:51 -0500 Subject: [PATCH] timeside/decoder/core.py: improve use of condition --- timeside/decoder/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.39.5