diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 79576c736c..f910d3d59c 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -5517,7 +5517,7 @@ DVB ``channels.conf``, ``--dvbin-full-transponder`` or the magic PID ``8192`` are recommended. -``--dvbin-timeout=<1-30>`` +``--dvbin-timeout=`` Maximum number of seconds to wait when trying to tune a frequency before giving up (default: 30). diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c index d409fc1888..39881f317f 100644 --- a/stream/dvb_tune.c +++ b/stream/dvb_tune.c @@ -278,7 +278,7 @@ static void print_status(dvb_priv_t *priv, fe_status_t festatus) MP_VERBOSE(priv, "\n"); } -static int check_status(dvb_priv_t *priv, int fd_frontend, int tmout) +static int check_status(dvb_priv_t *priv, int fd_frontend, float tmout) { fe_status_t festatus; bool ok = false; @@ -308,7 +308,7 @@ static int check_status(dvb_priv_t *priv, int fd_frontend, int tmout) if (!(festatus & FE_HAS_LOCK)) { MP_ERR(priv, "Not able to lock to the signal on the given frequency, " - "timeout: %d\n", tmout); + "timeout: %g\n", tmout); return -1; } @@ -403,7 +403,7 @@ static int tune_it(dvb_priv_t *priv, int fd_frontend, unsigned int delsys, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth, fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier, - int timeout) + float timeout) { dvb_state_t *state = priv->state; @@ -634,7 +634,7 @@ int dvb_tune(dvb_priv_t *priv, unsigned int delsys, fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate, fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier, - int timeout) + float timeout) { MP_INFO(priv, "Tuning to %s frequency %lu Hz\n", get_dvb_delsys(delsys), (long unsigned int) freq); diff --git a/stream/dvb_tune.h b/stream/dvb_tune.h index a884406de9..f0f9ac2252 100644 --- a/stream/dvb_tune.h +++ b/stream/dvb_tune.h @@ -36,6 +36,6 @@ int dvb_tune(dvb_priv_t *priv, unsigned int delsys, fe_modulation_t modulation, fe_guard_interval_t guardInterval, fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate, fe_code_rate_t LP_CodeRate, - fe_hierarchy_t hier, int timeout); + fe_hierarchy_t hier, float timeout); #endif /* MPLAYER_DVB_TUNE_H */ diff --git a/stream/dvbin.h b/stream/dvbin.h index 3daf7470de..13aef2d5c5 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -89,7 +89,7 @@ typedef struct { typedef struct { char *cfg_prog; int cfg_devno; - int cfg_timeout; + float cfg_timeout; char *cfg_file; bool cfg_full_transponder; int cfg_channel_switch_offset; diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 5660d6f0e5..b33ffbb913 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -74,7 +74,7 @@ const struct m_sub_options stream_dvb_conf = { .opts = (const m_option_t[]) { {"prog", OPT_STRING(cfg_prog), .flags = UPDATE_DVB_PROG}, {"card", OPT_INT(cfg_devno), M_RANGE(0, MAX_ADAPTERS-1)}, - {"timeout", OPT_INT(cfg_timeout), M_RANGE(1, 30)}, + {"timeout", OPT_FLOAT(cfg_timeout), M_RANGE(0, FLT_MAX)}, {"file", OPT_STRING(cfg_file), .flags = M_OPT_FILE}, {"full-transponder", OPT_BOOL(cfg_full_transponder)}, {"channel-switch-offset", OPT_INT(cfg_channel_switch_offset),