[pitivi: 2/10] discoverer: also query the duration once caps are fixed.



commit 0fbcd7d31ba4ac3a56574cee39b2d2af61d2d321
Author: Alessandro Decina <alessandro d gmail com>
Date:   Wed Mar 3 23:17:03 2010 +0100

    discoverer: also query the duration once caps are fixed.
    
    Workarounds a bug with flump3dec.

 pitivi/discoverer.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/discoverer.py b/pitivi/discoverer.py
index 1c0fc0f..3a647f4 100644
--- a/pitivi/discoverer.py
+++ b/pitivi/discoverer.py
@@ -627,8 +627,6 @@ class Discoverer(Signallable, Loggable):
             self._newPadCb(pad)
 
         # try to get the duration
-        # NOTE: this gets the duration only once, usually for the first stream.
-        # Demuxers don't seem to implement per stream duration queries anyway.
         self._maybeQueryDuration(pad)
 
         caps = pad.props.caps
@@ -651,6 +649,7 @@ class Discoverer(Signallable, Loggable):
             self.unfixed_pads += 1
 
     def _addStreamFromPad(self, pad):
+        self._maybeQueryDuration(pad)
         self.debug("adding stream from pad %s caps %s", pad, pad.props.caps)
         stream  = get_stream_for_pad(pad)
         self.current_streams.append(stream)



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