From 5bf831bbb0a751e87914157c6f845a007f0409cd Mon Sep 17 00:00:00 2001 From: Pedro Lira Date: Mon, 14 Aug 2023 16:43:20 -0300 Subject: [PATCH] Fix converter custom parameter builder (AudioSegment.from_file) --- AUTHORS | 5 ++++- pydub/audio_segment.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index dc75fb36..ba7aa700 100644 --- a/AUTHORS +++ b/AUTHORS @@ -98,4 +98,7 @@ Grzegorz Kotfis github: gkotfis Pål Orby - github: orby \ No newline at end of file + github: orby + +Pedro Lira + github: pedrohml \ No newline at end of file diff --git a/pydub/audio_segment.py b/pydub/audio_segment.py index 3b9e2881..424aebe1 100644 --- a/pydub/audio_segment.py +++ b/pydub/audio_segment.py @@ -755,12 +755,12 @@ def is_format(f): if duration is not None: conversion_command += ["-t", str(duration)] - conversion_command += ["-"] - if parameters is not None: # extend arguments with arbitrary set conversion_command.extend(parameters) + conversion_command += ["-"] + log_conversion(conversion_command) p = subprocess.Popen(conversion_command, stdin=stdin_parameter,