diff options
author | wm4 <wm4@nowhere> | 2016-11-22 15:28:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-11-22 15:54:45 +0100 |
commit | 78f76bdddd1df33fb76d9779d156bab66b5a81c1 (patch) | |
tree | 087aef4ed6c2ec1efc7b2d97f4ab99c9c701574c /stream | |
parent | c731513efaf27f18654089884c825d3fb1054873 (diff) |
tv: fix option type
It appears this makes it actually compatible with the property. It was
an ancient MPlayer artifact all along.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/tv.c | 4 | ||||
-rw-r--r-- | stream/tv.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/stream/tv.c b/stream/tv.c index b2bf150e1f..0b34b566d8 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -74,7 +74,7 @@ const struct m_sub_options tv_params_conf = { OPT_INT("audiorate", audiorate, 0), OPT_STRING("driver", driver, 0), OPT_STRING("device", device, 0), - OPT_STRING("freq", freq, 0), + OPT_FLOAT("freq", freq, 0), OPT_STRING("channel", channel, 0), OPT_STRING("chanlist", chanlist, 0), OPT_STRING("norm", norm, 0), @@ -602,7 +602,7 @@ int open_tv(tvi_handle_t *tvh) /* we need to set frequency */ if (tvh->tv_param->freq) { - unsigned long freq = atof(tvh->tv_param->freq)*16; + unsigned long freq = tvh->tv_param->freq * 16; /* set freq in MHz */ funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq); diff --git a/stream/tv.h b/stream/tv.h index d22b5b7076..434a52d4fd 100644 --- a/stream/tv.h +++ b/stream/tv.h @@ -27,7 +27,7 @@ struct mp_log; typedef struct tv_params { - char *freq; + float freq; char *channel; char *chanlist; char *norm; |