mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 23:07:02 +00:00
stream_dvb: avoid static function variable
This commit is contained in:
parent
2569c69d92
commit
c78c33bf7c
@ -103,6 +103,7 @@ typedef struct {
|
|||||||
char *prog;
|
char *prog;
|
||||||
int devno;
|
int devno;
|
||||||
|
|
||||||
|
int opts_check_time;
|
||||||
dvb_opts_t *opts;
|
dvb_opts_t *opts;
|
||||||
struct m_config_cache *opts_cache;
|
struct m_config_cache *opts_cache;
|
||||||
} dvb_priv_t;
|
} dvb_priv_t;
|
||||||
|
@ -933,13 +933,12 @@ static int dvb_streaming_start(stream_t *stream, char *progname)
|
|||||||
|
|
||||||
void dvb_update_config(stream_t *stream)
|
void dvb_update_config(stream_t *stream)
|
||||||
{
|
{
|
||||||
static int last_check = 0;
|
dvb_priv_t *priv = stream->priv;
|
||||||
int now = (int)(mp_time_sec()*10);
|
int now = (int)(mp_time_sec()*10);
|
||||||
|
|
||||||
// Throttle the check to at maximum once every 0.1 s.
|
// Throttle the check to at maximum once every 0.1 s.
|
||||||
if (now != last_check) {
|
if (now != priv->opts_check_time) {
|
||||||
last_check = now;
|
priv->opts_check_time = now;
|
||||||
dvb_priv_t *priv = (dvb_priv_t *) stream->priv;
|
|
||||||
if (m_config_cache_update(priv->opts_cache)) {
|
if (m_config_cache_update(priv->opts_cache)) {
|
||||||
dvb_state_t *state = priv->state;
|
dvb_state_t *state = priv->state;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user