Skip to content

obs-ffmpeg: AMF SubmitInput retry on AMF_INPUT_FULL yield-spins up to 5 s per frame #1276

Closed

Description

@zackees

Part of #1273. A.

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.

Activity

  1. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions