Skip to content

Commit

Permalink
Merge pull request jiaaro#431 from Rosuav/better-stderr-parsing
Browse files Browse the repository at this point in the history
Ensure that additional Stream lines are not misparsed
  • Loading branch information
jiaaro committed Jan 30, 2020
2 parents 558d116 + fd21cc4 commit cb1c871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydub/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def get_extra_info(stderr):
"""
extra_info = {}

re_stream = r'(?P<space_start> +)Stream #0[:\.](?P<stream_id>([0-9]+))(?P<content_0>.+)\n?((?P<space_end> +)(?P<content_1>.+))?'
re_stream = r'(?P<space_start> +)Stream #0[:\.](?P<stream_id>([0-9]+))(?P<content_0>.+)\n?(?! *Stream)((?P<space_end> +)(?P<content_1>.+))?'
for i in re.finditer(re_stream, stderr):
if i.group('space_end') is not None and len(i.group('space_start')) <= len(
i.group('space_end')):
Expand Down

0 comments on commit cb1c871

Please sign in to comment.