Commit cbe863f7 authored by Laurent Aimar's avatar Laurent Aimar

Prevent a 0 division when invalid frequency step is reported by dvb.

parent 6f74730c
......@@ -414,7 +414,7 @@ static int ScanParametersDvbC( access_t *p_access, scan_parameter_t *p_scan )
/* */
p_scan->frequency.i_min = p_frontend->info.frequency_min;
p_scan->frequency.i_max = p_frontend->info.frequency_max;
p_scan->frequency.i_step = p_frontend->info.frequency_stepsize;
p_scan->frequency.i_step = p_frontend->info.frequency_stepsize ?: 166667;
p_scan->frequency.i_count = (p_scan->frequency.i_max-p_scan->frequency.i_min)/p_scan->frequency.i_step;
/* */
......@@ -436,7 +436,7 @@ static int ScanParametersDvbT( access_t *p_access, scan_parameter_t *p_scan )
/* */
p_scan->frequency.i_min = p_frontend->info.frequency_min;
p_scan->frequency.i_max = p_frontend->info.frequency_max;
p_scan->frequency.i_step = p_frontend->info.frequency_stepsize;
p_scan->frequency.i_step = p_frontend->info.frequency_stepsize ?: 166667;
p_scan->frequency.i_count = (p_scan->frequency.i_max-p_scan->frequency.i_min)/p_scan->frequency.i_step;
/* */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment