From 20381a5f5a933744503a0889dca5dba68222aa73 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Sun, 8 Oct 2017 04:37:42 +0200 Subject: stream_dvb: Multiply frequency and sample rate by 1000 for VDR. These values are kept with a different unit in VDR style config for all delivery systems, not only for DVB-S / DVB-S2. Signed-off-by: Oliver Freyermuth --- stream/stream_dvb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 0638b17f22..1572f2687b 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -301,7 +301,9 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, if (num_chars == strlen(&line[k])) { // It's a VDR-style config line. parse_vdr_par_string(vdr_par_str, ptr); - // We still need the special SAT-handling here. + // Units in VDR-style config files are divided by 1000. + ptr->freq *= 1000UL; + ptr->srate *= 1000UL; switch (delsys) { case SYS_DVBT: case SYS_DVBT2: @@ -334,9 +336,6 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, if (!DELSYS_IS_SET(delsys_mask, delsys)) continue; /* Skip channel. */ - ptr->freq *= 1000UL; - ptr->srate *= 1000UL; - if (vdr_loc_str[0]) { // In older vdr config format, this field contained the DISEQc information. // If it is numeric, assume that's it. -- cgit v1.2.3