You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
obs-ffmpeg: AMF SubmitInput retry on AMF_INPUT_FULL yield-spins up to 5 s per frame #1276
plugins/obs-ffmpeg/texture-amf.cpp.hpp:750-758, on the encoder thread: on AMF_INPUT_FULL it retries SubmitInput with os_sleep_ms(1) for up to 5 s before throwing. On Windows os_sleep_ms(1) is Sleep(0) (#1274), so a backed-up AMD encoder yield-spins a core for up to 5 s per frame.
Fix: back off with a real sleep (≥1 ms once the root issue is fixed, or a growing delay), or wait on the encoder's output instead of polling input.
Test: with a fake component that reports AMF_INPUT_FULL N times, the retry loop's iteration count per second stays bounded and the 5 s deadline still holds.
Resolved by the root fix #1293 (closed #1274): os_sleep_ms(1) on Windows no longer becomes Sleep(0), so the AMF_INPUT_FULL retry in texture-amf.cpp.hpp now sleeps ≥1 ms per iteration (≤~1000 polls/s) and keeps its 5 s deadline. This is the issue's stated fix ("≥1 ms once the root issue is fixed"); no AMF change needed. A smarter wait-on-output design can be a separate enhancement if wanted.
Activity
zackees commentedon Oct 23, 2026
Resolved by the root fix #1293 (closed #1274):
os_sleep_ms(1)on Windows no longer becomesSleep(0), so theAMF_INPUT_FULLretry intexture-amf.cpp.hppnow sleeps ≥1 ms per iteration (≤~1000 polls/s) and keeps its 5 s deadline. This is the issue's stated fix ("≥1 ms once the root issue is fixed"); no AMF change needed. A smarter wait-on-output design can be a separate enhancement if wanted.