[pitivi] timeline.Track: Fill in GnlSource before putting it in a GnlComposition.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] timeline.Track: Fill in GnlSource before putting it in a GnlComposition.
- Date: Thu, 16 Jul 2009 14:46:52 +0000 (UTC)
commit c22bf55bc420b6f39637381fa84e9aed5c59c81d
Author: Edward Hervey <bilboed bilboed com>
Date: Thu Jul 16 16:43:26 2009 +0200
timeline.Track: Fill in GnlSource before putting it in a GnlComposition.
This avoids a race-condition where the GnlSource wouldn't be ready before the
moment GnlComposition tries to use it.
pitivi/timeline/track.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 526a2f1..d0035ad 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -699,16 +699,18 @@ class Track(Signallable):
if track_object.track is not None:
raise TrackError()
- try:
- self.composition.add(track_object.gnl_object)
- except gst.AddError:
+ if track_object.gnl_object in list(self.composition):
raise TrackError()
-
track_object.makeBin()
track_object.track = weakref.proxy(self)
self.track_objects.append(track_object)
+ try:
+ self.composition.add(track_object.gnl_object)
+ except gst.AddError:
+ raise TrackError()
+
self._connectToTrackObjectSignals(track_object)
self._updateMaxPriority()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]