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
1 changed files with 2 additions and 1 deletions

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: