mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-12 01:17:46 +08:00
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:
parent
e7c39d0c20
commit
891258882d
@ -80,7 +80,7 @@ def probe_audio_params(container: InputContainer, audio_stream, max_packets: int
|
|||||||
try:
|
try:
|
||||||
frames = packet.decode()
|
frames = packet.decode()
|
||||||
except av.error.FFmpegError:
|
except av.error.FFmpegError:
|
||||||
return 0, 0
|
frames = ()
|
||||||
if frames:
|
if frames:
|
||||||
return frames[0].sample_rate, frames[0].layout.nb_channels
|
return frames[0].sample_rate, frames[0].layout.nb_channels
|
||||||
if i >= max_packets:
|
if i >= max_packets:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user