From b0f28b5ee3708cc40141136192178cb2fdfceef7 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 31 Jul 2010 19:13:07 +1000 Subject: [PATCH] Fixed incorrect file extension for --copyac3 --- encode.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/encode.py b/encode.py index c788bb6..2f83bc9 100755 --- a/encode.py +++ b/encode.py @@ -57,9 +57,13 @@ class Command(object): def __init__(self, profile, opts): self.profile = profile self.opts = opts + self.init() self.audio_tmp = "audio." + self.codec2exts[profile.acodec] self.video_tmp = "video." + self.codec2exts[profile.vcodec] - + + def init(self): + pass + def print_install_message(self): print >>sys.stderr, "Problem with command: %s", self.name if self.package: @@ -151,6 +155,11 @@ class Mencoder(Command): "mp3lame": "-lameopts", } + def init(self): + if self.opts.copyac3: + self.profile.acodec = "copyac3" + self.profile.aopts = None + def insert_options(self, cmd): def try_opt(opt, var): if var is not None: @@ -186,10 +195,8 @@ class Mencoder(Command): p = self.profile acodec = p.acodec - if self.opts.copyac3: + if acodec == "copyac3": acodec = "copy" - p.acodec = "copyac3" - p.aopts = None cmd = [] cmd += ["mencoder", self.opts.input] -- 2.39.2