only use audio duration if no video track was found
This commit is contained in:
parent
82ba870e29
commit
ffe7f40e18
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue