mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
stream_dvb: global protection mutex and usage bit for global_dvb_state.
The mutex is used in dvbin_open and dvbin_close only since these are the only entry / exit points to the stream. When opening, it is first checked (mutexed) whether the state already exists and is in use, then a STREAM_ERROR is returned, since there may be only one stream_dvb active at a time. State-creation itself is also protected by mutex. In dvbin_close, the usage-bit is set to false (mutexed) in case of channel switch. In case of stream-teardown, the state is destructed (also protected by mutex).
This commit is contained in:
@@ -103,6 +103,7 @@ typedef struct {
|
||||
int timeout;
|
||||
int last_freq;
|
||||
bool switching_channel;
|
||||
bool stream_used;
|
||||
} dvb_state_t;
|
||||
|
||||
typedef struct dvb_params {
|
||||
|
||||
Reference in New Issue
Block a user