fix: continue probing audio parameters after a packet decode error instead of dropping stream immediately
Some checks are pending
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run

Signed-off-by: bigcat88 <bigcat88@icloud.com>
This commit is contained in:
bigcat88 2026-07-08 15:35:32 +03:00
parent be27c9c3df
commit 64f73d4079
No known key found for this signature in database
GPG Key ID: 1F0BF0EC3CF22721

View File

@ -80,7 +80,7 @@ def probe_audio_params(container: InputContainer, audio_stream, max_packets: int
try:
frames = packet.decode()
except av.error.FFmpegError:
return 0, 0
frames = ()
if frames:
return frames[0].sample_rate, frames[0].layout.nb_channels
if i >= max_packets: