Use shlex.split for --pp-params and update related docs.

This commit is contained in:
Aurélio A. Heckert 2015-06-16 18:10:31 -03:00
parent d84f1d14b5
commit 14835de9fb
5 changed files with 10 additions and 6 deletions

View file

@ -171,8 +171,10 @@ def _real_main(argv=None):
if opts.recodevideo is not None:
if opts.recodevideo not in ['mp4', 'flv', 'webm', 'ogg', 'mkv', 'xvid']:
parser.error('invalid video recode format specified')
if opts.pp_params is not None:
opts.pp_params = opts.pp_params.split()
if opts.pp_params is None:
opts.pp_params = []
else:
opts.pp_params = shlex.split(opts.pp_params)
if opts.convertsubtitles is not None:
if opts.convertsubtitles not in ['srt', 'vtt', 'ass']:
parser.error('invalid subtitle format specified')