From c7ce1e1f57570e7ce6098ef94242dd095a4a716c Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 20 Mar 2016 03:42:43 -0400 Subject: [PATCH] cleanup --- converter/avcodecs.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/converter/avcodecs.py b/converter/avcodecs.py index cd3027d0..5937d308 100644 --- a/converter/avcodecs.py +++ b/converter/avcodecs.py @@ -27,13 +27,12 @@ def safe_options(self, opts): # Only copy options that are expected and of correct type # (and do typecasting on them) for k, v in opts.items(): - if k in self.encoder_options: + if k in self.encoder_options and v is not None: typ = self.encoder_options[k] - if typ: - try: - safe[k] = typ(v) - except: - pass + try: + safe[k] = typ(v) + except: + pass return safe @@ -170,7 +169,7 @@ def parse_options(self, opt, stream=0): s = str(0) if 'encoding' in safe: - if not safe['encoding'] or safe['encoding'] == "" or safe['encoding'].lower() == "none": + if not safe['encoding']: del safe['encoding'] safe = self._codec_specific_parse_options(safe)