Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bouquets: fastscan - do not check the frequency too strictly
  • Loading branch information
perexg committed Nov 20, 2014
1 parent 1ddd261 commit f7d356c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/input/mpegts/fastscan.c
Expand Up @@ -47,15 +47,13 @@ static SKEL_DECLARE(fastscan_rb_skel, dvb_fastscan_t);
static int
_fs_cmp(const void *a, const void *b)
{
int64_t aa = ((dvb_fastscan_t *)a)->position * 1000000000LL +
((dvb_fastscan_t *)a)->frequency;
int64_t bb = ((dvb_fastscan_t *)b)->position * 1000000000LL +
((dvb_fastscan_t *)b)->frequency;
if (aa < bb)
return -1;
if (aa > bb)
return 1;
return 0;
int r = ((dvb_fastscan_t *)a)->position - ((dvb_fastscan_t *)b)->position;
if (r == 0) {
r = ((dvb_fastscan_t *)a)->frequency - ((dvb_fastscan_t *)b)->frequency;
if (abs(r) < 2000)
return 0;
}
return r;
}

void
Expand Down

0 comments on commit f7d356c

Please sign in to comment.