diff --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c index ba6a8888e4..409af95f7a 100644 --- a/stream/tvi_bsdbt848.c +++ b/stream/tvi_bsdbt848.c @@ -190,13 +190,13 @@ static tvi_handle_t *tvi_init_bsdbt848(char *device,char* adevice) priv->tunerdev = strdup("/dev/tuner0"); }else{ sep = strchr(device,','); + priv->btdev = strdup(device); if(sep){ // tuner device is also passed priv->tunerdev = strdup(sep+1); - priv->btdev = strndup(device,sep-device); + priv->btdev[sep - device] = 0; }else{ priv->tunerdev = strdup("/dev/tuner0"); - priv->btdev = strdup(device); } }