Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
scanfile: fix DVB-T bandwidth parsing for dvbv5 format, fixes #2336
  • Loading branch information
perexg committed Sep 29, 2014
1 parent 71478e1 commit 8f7e6e5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/input/mpegts/scanfile.c
Expand Up @@ -422,9 +422,17 @@ scanfile_load_dvbv5 ( scanfile_network_t *net, char *line, fb_file *fp )
mux->u.dmc_fe_ofdm.hierarchy_information = DVB_HIERARCHY_NONE;
mux->dmc_fe_inversion = DVB_INVERSION_AUTO;

if ((x = htsmsg_get_str(l, "BANDWIDTH_HZ")))
if ((x = htsmsg_get_str(l, "BANDWIDTH_HZ"))) {
if (isdigit(x[0])) {
/* convert to kHz */
int64_t ll = strtoll(x, NULL, 0);
ll /= 1000;
snprintf(buf, sizeof(buf), "%llu", (long long unsigned)ll);
x = buf;
}
if ((mux->u.dmc_fe_ofdm.bandwidth = dvb_str2bw(x)) == -1)
mux_fail(r, "wrong bandwidth '%s'", x);
}
if ((x = htsmsg_get_str(l, "CODE_RATE_HP")))
if ((mux->u.dmc_fe_ofdm.code_rate_HP = dvb_str2fec(x)) == -1)
mux_fail(r, "wrong code rate HP '%s'", x);
Expand Down

0 comments on commit 8f7e6e5

Please sign in to comment.