Starts probing ffmpeg at once; pieces that arrive meanwhile wait.
Whether the avatar was taken down: the agent is heard without it.
How many decoded frames wait to be shown (telemetry, tests).
Takes one avatar piece: an init segment (re)configures the decoders; a fragment's samples go to them. Never throws.
The piece.
Stops the decoders and the frame clock. The room's teardown takes the track down.
A barge-in: drops the frames waiting to be shown and fences both decoders, so what was decoded from before the barge-in is discarded. The last frame shown stays on screen. Pieces held while ffmpeg is probed are dropped too, except the newest init segment, which the next fragments may still need.
No more avatar: the audio-only replacement session's voice is playing, or a media worker rejoined after the avatar was taken down. The decoders stop and later pieces are dropped.
One room client's avatar: decoders, clock, frame queue and camera track.