Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
michael committed Mar 20, 2016
1 parent 4e3685f commit c7ce1e1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions converter/avcodecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c7ce1e1

Please sign in to comment.