mpegts_mux_dvb: fix the dvb-s position parsing
This commit is contained in:
parent
58b6bd8e3c
commit
65aad9ba55
1 changed files with 6 additions and 1 deletions
|
@ -436,8 +436,13 @@ dvb_mux_dvbs_class_orbital_set ( void *o, const void *s )
|
|||
const char *tmp = s;
|
||||
dvb_mux_t *lm = o;
|
||||
|
||||
/* Note that 'E' is not passed to dir from sscanf (scientific float format) */
|
||||
if ((n = sscanf(tmp, "%f%c", &posf, &dir)) < 1) return 0;
|
||||
if (n != 2) dir = 0;
|
||||
if (n != 2) {
|
||||
dir = tmp[0] != '\0' ? tmp[strlen(tmp)-1] : 0;
|
||||
if (dir != 'E' && dir != 'W')
|
||||
dir = 0;
|
||||
}
|
||||
pos = (int)floorf(posf * 10.0);
|
||||
|
||||
if (pos != lm->lm_tuning.u.dmc_fe_qpsk.orbital_pos ||
|
||||
|
|
Loading…
Add table
Reference in a new issue