pcm sound can have no codec
This commit is contained in:
parent
2cec1b9ad5
commit
92f642cbac
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ class File(models.Model):
|
||||||
self.height = 0
|
self.height = 0
|
||||||
if 'audio' in self.info and self.info['audio'] and self.duration > 0:
|
if 'audio' in self.info and self.info['audio'] and self.duration > 0:
|
||||||
audio = self.info['audio'][0]
|
audio = self.info['audio'][0]
|
||||||
self.audio_codec = audio['codec']
|
self.audio_codec = audio.get('codec', '')
|
||||||
self.samplerate = audio.get('samplerate', 0)
|
self.samplerate = audio.get('samplerate', 0)
|
||||||
self.channels = audio.get('channels', 0)
|
self.channels = audio.get('channels', 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue