Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: always create a tuner even without delsys info
  • Loading branch information
perexg committed Dec 8, 2015
1 parent 3de1b54 commit 36e42e6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/input/mpegts/linuxdvb/linuxdvb_adapter.c
Expand Up @@ -297,7 +297,7 @@ linuxdvb_adapter_add ( const char *path )
int save = 0;
dvb_fe_type_t type;
#if DVB_VER_ATLEAST(5,5)
int delsys;
int delsys, fenum, type5;
dvb_fe_type_t fetypes[DVB_TYPE_LAST+1];
struct dtv_property cmd;
linuxdvb_frontend_t *lfe;
Expand Down Expand Up @@ -380,25 +380,29 @@ linuxdvb_adapter_add ( const char *path )
/* Create frontend */
#if DVB_VER_ATLEAST(5,5)
memset(fetypes, 0, sizeof(fetypes));
for (j = 0; j < cmd.u.buffer.len; j++) {
for (j = fenum = 0; j < cmd.u.buffer.len; j++) {
delsys = cmd.u.buffer.data[j];

if ((delsys = linuxdvb2tvh_delsys(delsys)) == DVB_SYS_NONE)
continue;

/* Invalid */
if ((type = dvb_delsys2type(delsys)) == DVB_TYPE_NONE)
if ((type5 = dvb_delsys2type(delsys)) == DVB_TYPE_NONE)
continue;

/* Couldn't find */
if (fetypes[type])
if (fetypes[type5])
continue;

/* Create */
linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path,
type, dfi.name);
fetypes[type] = 1;
type5, dfi.name);
fetypes[type5] = 1;
fenum++;
}
if (fenum == 0)
linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path,
type, dfi.name);
#else
linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path, type, dfi.name);
#endif
Expand Down

0 comments on commit 36e42e6

Please sign in to comment.