mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-31 00:30:21 +08:00
fix: add fail-fast validation for unsupported codecs
Replace silent fallback to libx264 with explicit validation that raises ValueError for unknown codec types. Prevents silent codec substitution.
This commit is contained in:
parent
dcbe072e8a
commit
bb7c582b58
@ -389,7 +389,9 @@ class VideoFromComponents(VideoInput):
|
||||
VideoCodec.H264: "libx264",
|
||||
VideoCodec.VP9: "libvpx-vp9",
|
||||
}
|
||||
ffmpeg_codec = codec_map.get(resolved_codec, "libx264")
|
||||
if resolved_codec not in codec_map:
|
||||
raise ValueError(f"Unsupported codec: {resolved_codec}")
|
||||
ffmpeg_codec = codec_map[resolved_codec]
|
||||
|
||||
extra_kwargs = {}
|
||||
if resolved_format != VideoContainer.AUTO:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user