only use audio duration if no video track was found

This commit is contained in:
j 2009-01-27 15:39:53 +05:30
parent 82ba870e29
commit ffe7f40e18

View file

@ -44,7 +44,8 @@ class Info(dict):
#self['sample width (bits)'] = d.audiowidth
#self['sample depth (bits)'] = d.audiodepth
self['samplerate'] = d.audiorate
self['duration'] = max(self.get('duration', 0), d.audiolength/gst.MSECOND)
if 'duration' not in self:
self['duration'] = d.audiolength/gst.MSECOND
self['channels'] = d.audiochannels
if 'video-codec' in d.tags: