[vlc-commits] dtv: fix build with Linux DVB versions <= 5.8 (fixes #14156)

Rémi Denis-Courmont git at videolan.org
Mon Mar 16 18:30:40 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 16 18:24:07 2015 +0200| [f4604778e41b385e464ce17c4c64488b40aa61da] | committer: Rémi Denis-Courmont

dtv: fix build with Linux DVB versions <= 5.8 (fixes #14156)

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

 modules/access/dtv/linux.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 77789d7..7e44f31 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -912,11 +912,24 @@ int dvb_set_dvbs2 (dvb_device_t *d, uint64_t freq_Hz, const char *modstr,
 
     if (dvb_find_frontend (d, DVB_S2))
         return -1;
+#if DVBv5(8)
     return dvb_set_props (d, 9, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_DVBS2,
                           DTV_FREQUENCY, freq, DTV_MODULATION, mod,
                           DTV_SYMBOL_RATE, srate, DTV_INNER_FEC, fec,
                           DTV_PILOT, pilot, DTV_ROLLOFF, rolloff,
                           DTV_STREAM_ID, (uint32_t)sid);
+#else
+# warning DVB-S2 needs Linux DVB version 5.8 or later.
+    if (sid != 0)
+    {
+        msg_Err (d->obj, "DVB-S2 stream ID support not compiled-in");
+        return -1;
+    }
+    return dvb_set_props (d, 8, DTV_CLEAR, 0,  DTV_DELIVERY_SYSTEM, SYS_DVBS2,
+                          DTV_FREQUENCY, freq, DTV_MODULATION, mod,
+                          DTV_SYMBOL_RATE, srate, DTV_INNER_FEC, fec,
+                          DTV_PILOT, pilot, DTV_ROLLOFF, rolloff);
+#endif
 }
 
 



More information about the vlc-commits mailing list