From ffe7f40e180f3696fea1d5cdb6947e08864b1211 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 27 Jan 2009 15:39:53 +0530 Subject: [PATCH] only use audio duration if no video track was found --- oxgst/info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxgst/info.py b/oxgst/info.py index 9012513..cfe0b52 100644 --- a/oxgst/info.py +++ b/oxgst/info.py @@ -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: