GNOME Bugzilla – Bug 625860
[patch] Incorrect duration of still images
Last modified: 2011-09-18 14:47:03 UTC
Initially reported in https://bugs.launchpad.net/ubuntu/+source/pitivi/+bug/608946 Quote: If you add a still image, it's "default_duration" is 5 seconds. However, it's "duration" is set to 2**64 (truncated, I expect). Looks like a problem converting from seconds to gst.SECONDs. Here's what the relevant XML looks like: <source default_duration="5000000000" duration="18446744073709551615" ... > -------------------------------------- There seems to be a patch available on https://code.launchpad.net/~jderose/ubuntu/lucid/pitivi/fix-608946
duration="18446744073709551615" stands for gst.CLOCK_TIME_NONE. The meaning is that the picture (which has been added to the project) has no duration. For the media that has no duration (like pictures), the default_duration attribute is used when it is added to the timeline. So everything is working as intended here. I suggest to close this bug as invalid. For the record, below is the change from: https://code.launchpad.net/~jderose/ubuntu/lucid/pitivi/fix-608946 class PictureFileSourceFactory(FileSourceFactory): """ Factory for image sources. @see: L{FileSourceFactory}, L{RandomAccessSourceFactory}. """ duration = 3600 * gst.SECOND default_duration = 5 * gst.SECOND + + def __init__(self, uri, name=''): + FileSourceFactory.__init__(self, uri, name) + self.duration = 3600 * gst.SECOND