From ca427cb904d879e2192c600e3ddd64116b52c2ed Mon Sep 17 00:00:00 2001 From: Ross Patterson Date: Fri, 9 Aug 2019 15:09:22 -0700 Subject: [PATCH] Build: Match the codecs output more closely, better semantics --- ffmpeg/_build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffmpeg/_build.py b/ffmpeg/_build.py index 18eca7e..f76939d 100644 --- a/ffmpeg/_build.py +++ b/ffmpeg/_build.py @@ -140,7 +140,9 @@ def get_codecs(cmd='ffmpeg'): codecs = _get_line_fields(stdout, 10, CODEC_RE, CODEC_FLAGS) for codec in codecs.values(): for coders_match in CODEC_CODERS_RE.finditer(codec['description']): - codec[coders_match.group(1)] = coders_match.group(3).split() + coders = coders_match.group(3).split() + if coders: + codec[coders_match.group(1)] = coders description_match = CODEC_DESCRIPTION_RE.search(codec['description']) if description_match is not None: codec['description'] = description_match.group('description')