[vlc-commits] DVB: remove unused parameter

Rémi Denis-Courmont git at videolan.org
Thu May 26 16:14:17 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 25 23:50:28 2011 +0300| [ceeacab6949a7146bd2ee078bb22be77a954c661] | committer: Rémi Denis-Courmont

DVB: remove unused parameter

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ceeacab6949a7146bd2ee078bb22be77a954c661
---

 modules/access/dtv/access.c     |    4 ++--
 modules/access/dtv/bdagraph.cpp |    5 +----
 modules/access/dtv/dtv.h        |    2 +-
 modules/access/dtv/linux.c      |    2 +-
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index d0369cd..90c3d9e 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -361,9 +361,8 @@ static int Open (vlc_object_t *obj)
         return VLC_ENOMEM;
 
     var_LocationParse (obj, access->psz_location, "dvb-");
-    unsigned freq = var_InheritFrequency (obj);
 
-    dvb_device_t *dev = dvb_open (obj, freq != 0);
+    dvb_device_t *dev = dvb_open (obj);
     if (dev == NULL)
     {
         free (sys);
@@ -373,6 +372,7 @@ static int Open (vlc_object_t *obj)
     sys->dev = dev;
     access->p_sys = sys;
 
+    unsigned freq = var_InheritFrequency (obj);
     if (freq != 0)
     {
         const delsys_t *delsys = GuessSystem (access->psz_access, dev);
diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp
index af28315..23ab96a 100644
--- a/modules/access/dtv/bdagraph.cpp
+++ b/modules/access/dtv/bdagraph.cpp
@@ -130,11 +130,8 @@ struct dvb_device
     uint32_t lowf, highf, switchf;
 };
 
-dvb_device_t *dvb_open (vlc_object_t *obj, bool tune)
+dvb_device_t *dvb_open (vlc_object_t *obj)
 {
-    if (!tune)
-        return NULL; /* not implemented (yet?) */
-
     dvb_device_t *d = new dvb_device_t;
 
     d->module = new BDAGraph (obj);
diff --git a/modules/access/dtv/dtv.h b/modules/access/dtv/dtv.h
index 19349ec..3cdcd3f 100644
--- a/modules/access/dtv/dtv.h
+++ b/modules/access/dtv/dtv.h
@@ -32,7 +32,7 @@ extern const delsys_t dvbc, dvbs, dvbs2, dvbt, dvbt2, atsc, cqam;
 
 typedef struct dvb_device dvb_device_t;
 
-dvb_device_t *dvb_open (vlc_object_t *obj, bool tune);
+dvb_device_t *dvb_open (vlc_object_t *obj);
 void dvb_close (dvb_device_t *);
 ssize_t dvb_read (dvb_device_t *, void *, size_t);
 
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index df0f7ec..b6c22f1 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -192,7 +192,7 @@ struct dvb_device
 /**
  * Opens the DVB tuner
  */
-dvb_device_t *dvb_open (vlc_object_t *obj, bool tune)
+dvb_device_t *dvb_open (vlc_object_t *obj)
 {
     dvb_device_t *d = malloc (sizeof (*d));
     if (unlikely(d == NULL))



More information about the vlc-commits mailing list