io

Read the bytes through your own code instead of through FFmpeg's protocols.

A FACTORY, not a reader. The engine calls it once per open and closes what it gets when that session ends, so every call must return a FRESH reader. One media item is opened more than once by perfectly ordinary playback: a track switch reopens the container, so does a hardware decoder recovery, so does a loop, and so does a queue coming back round. Holding one live reader here meant the second open was handed the one the first session had already closed, and the media simply stopped.

Wired through the custom AVIO bridge: when set, uri is a label only and every byte the demuxer touches comes from the reader this makes. This is how an application plays through its own HTTP client with its own TLS and auth, from an encrypted store, a torrent, a cache, or bytes it already holds.