[pitivi] TimelineFactory: Guarantee a unique pad name



commit 1303399c98f5c481d4a83b41b9e22582a375552b
Author: Edward Hervey <bilboed bilboed com>
Date:   Sun Jul 19 19:26:06 2009 +0200

    TimelineFactory: Guarantee a unique pad name
    
    Due to this code being called from two different threads, we need a better
    way to guarantee a unique pad name. Taking the python id of the pad (which will
    be unique) is a simple and effective way.

 pitivi/factories/timeline.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/factories/timeline.py b/pitivi/factories/timeline.py
index a2f2320..405be6e 100644
--- a/pitivi/factories/timeline.py
+++ b/pitivi/factories/timeline.py
@@ -131,7 +131,7 @@ class TimelineSourceFactory(SourceFactory):
         self.bin.add(seek)
         seek.set_state(gst.STATE_PLAYING)
         pad.link(seek.get_pad('sink'))
-        ghost = gst.GhostPad('src%d' % self.pad_num, seek.get_pad('src'))
+        ghost = gst.GhostPad('src%d' % self.pad_num + str(id(pad)), seek.get_pad('src'))
         ghost.set_active(True)
         self.ghosts[pad_id] = ghost
         self.seek_checkers[pad_id] = seek



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