decomp: input thread re-enters access
Typically, the input thread call stack looks like: input -> demux -> stream -> access.
If however, we have a threaded stream filter, it looks like: input -> demux -> stream filter. And then the extra stream filter thread looks like: stream filter -> stream -> access. In this case, the input thread cannot invoke access callbacks directly, lest it trigger re-entrancy bugs.
Affected call paths are located in src/input/input.c:
- ControlPause(),
- ControlUnpause(),
- Control() at case INPUT_CONTROL_ADD_SLAVE,
- UpdateGenericFromAccess(),
- and InputSourceInit() after the stream_FilterChainNew() call.
Regarding ControlPause() and ControlUnpause(), the following access plugins are concerned: avio, dv, ftp, mmsh and mmstu; they implement the ACCESS_SET_PAUSE_STATE control. And regarding UpdateGenericFromAccess(), the following access plugins are concerned: http (for INPUT_UPDATE_META) and dtv (for INPUT_UPDATE_SIGNAL).
This bug mainly affects the decompression filter. Nevertheless it might also concern any of the 3 HTTP streaming filter (also threaded stream filters).