fix: continue probing audio parameters after a packet decode error instead of dropping stream immediately

Signed-off-by: bigcat88 <bigcat88@icloud.com>
This commit is contained in:
bigcat88 2026-07-08 15:35:32 +03:00
parent e7c39d0c20
commit 891258882d
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: