mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-31 08:40:19 +08:00
Add null check for audio streams
This commit is contained in:
parent
4b37647ce1
commit
37c2a960cb
@ -243,8 +243,8 @@ class VideoFromFile(VideoInput):
|
||||
audio = None
|
||||
container.seek(start_pts, stream=video_stream)
|
||||
# Use last stream for consistency
|
||||
audio_stream = container.streams.audio[-1]
|
||||
if audio_stream:
|
||||
if len(container.streams.audio):
|
||||
audio_stream = container.streams.audio[-1]
|
||||
audio_frames = []
|
||||
resample = av.audio.resampler.AudioResampler(format='fltp').resample
|
||||
frames = itertools.chain.from_iterable(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user