pitivi r1354 - trunk/pitivi/elements
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1354 - trunk/pitivi/elements
- Date: Mon, 3 Nov 2008 12:28:41 +0000 (UTC)
Author: edwardrv
Date: Mon Nov 3 12:28:41 2008
New Revision: 1354
URL: http://svn.gnome.org/viewvc/pitivi?rev=1354&view=rev
Log:
ImageFreeze: Stop task if we don't have a buffer
Plus other fixes
Modified:
trunk/pitivi/elements/imagefreeze.py
Modified: trunk/pitivi/elements/imagefreeze.py
==============================================================================
--- trunk/pitivi/elements/imagefreeze.py (original)
+++ trunk/pitivi/elements/imagefreeze.py Mon Nov 3 12:28:41 2008
@@ -88,6 +88,7 @@
self._segment.init(gst.FORMAT_TIME)
self._needsegment = True
self._bufferduration = 0
+ self._outputrate = gst.Fraction(25, 1)
# this is the buffer we store and repeatedly output
self._buffer = None
# this will be set by our task
@@ -124,7 +125,7 @@
# 4. When we have an accepted caps downstream, we store the negotiated
# framerate and return
if not candidate.has_key("framerate"):
- candidate["framerate"] = gst.Fraction(25,1)
+ candidate["framerate"] = gst.Fraction(25, 1)
self._outputrate = candidate["framerate"]
self._bufferduration = gst.SECOND * self._outputrate.denom / self._outputrate.num
self._srccaps = candidate.copy()
@@ -182,6 +183,11 @@
return gst.FLOW_WRONG_STATE
def _our_task(self, something):
+ if self._buffer == None:
+ gst.warning("We were started without a buffer, exiting")
+ self.srcpad.pause_task()
+ return
+
#this is where we repeatedly output our buffer
gst.debug("self:%r, something:%r" % (self, something))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]