From 273fcb645860f6656a8b379062997e6c913e0b96 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 12 Jun 2012 14:20:48 +0200 Subject: [PATCH] audio channel should never be 0 --- pandora_client/extract.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_client/extract.py b/pandora_client/extract.py index 1f8d3f7..08ca98d 100644 --- a/pandora_client/extract.py +++ b/pandora_client/extract.py @@ -178,7 +178,10 @@ def video_cmd(video, target, profile, info): video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)] audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)] ac = info['audio'][0].get('channels', audiochannels) - ac = min(ac, audiochannels) + if ac: + ac = min(ac, audiochannels) + else: + ac = audiochannels audio_settings += ['-ac', str(ac)] if audiobitrate: audio_settings += ['-ab', audiobitrate]