[vlc-commits] access: dtv: fix build

Francois Cartegnie git at videolan.org
Mon Apr 18 23:32:59 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 18 23:31:57 2016 +0200| [2082625daffdb0489e3c34ef370f52819061a558] | committer: Francois Cartegnie

access: dtv: fix build

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

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

diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 29eca7c..4a767a2 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -580,7 +580,8 @@ static int Control (access_t *access, int query, va_list args)
         {
             en50221_capmt_info_t *pmt = va_arg (args, en50221_capmt_info_t *);
 
-            dvb_set_ca_pmt (dev, pmt);
+            if( !dvb_set_ca_pmt (dev, pmt) )
+                return VLC_EGENERIC;
             break;
         }
 
diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp
index 4d31213..1fa577a 100644
--- a/modules/access/dtv/bdagraph.cpp
+++ b/modules/access/dtv/bdagraph.cpp
@@ -198,6 +198,11 @@ int dvb_tune (dvb_device_t *d)
     return d->module->SubmitTuneRequest ();
 }
 
+bool dvb_set_ca_pmt (dvb_device_t *, en50221_capmt_info_t *)
+{
+    return false;
+}
+
 /* DVB-C */
 int dvb_set_dvbc (dvb_device_t *d, uint32_t freq, const char *mod,
                   uint32_t srate, uint32_t /*fec*/)
diff --git a/modules/access/dtv/dtv.h b/modules/access/dtv/dtv.h
index d315174..5195cd5 100644
--- a/modules/access/dtv/dtv.h
+++ b/modules/access/dtv/dtv.h
@@ -57,7 +57,7 @@ float dvb_get_signal_strength (dvb_device_t *);
 float dvb_get_snr (dvb_device_t *);
 
 typedef struct en50221_capmt_info_s en50221_capmt_info_t;
-void dvb_set_ca_pmt (dvb_device_t *, en50221_capmt_info_t *);
+bool dvb_set_ca_pmt (dvb_device_t *, en50221_capmt_info_t *);
 
 int dvb_set_inversion (dvb_device_t *, int);
 int dvb_tune (dvb_device_t *);
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 507ded2..a8ea5f1 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -633,10 +633,14 @@ float dvb_get_snr (dvb_device_t *d)
     return snr / 65535.;
 }
 
-void dvb_set_ca_pmt (dvb_device_t *d, en50221_capmt_info_t *p_capmtinfo)
+bool dvb_set_ca_pmt (dvb_device_t *d, en50221_capmt_info_t *p_capmtinfo)
 {
     if (d->cam != NULL)
+    {
         en50221_SetCAPMT (d->cam, p_capmtinfo);
+        return true;
+    }
+    return false;
 }
 
 static int dvb_vset_props (dvb_device_t *d, size_t n, va_list ap)



More information about the vlc-commits mailing list