From 6f85c322e5a04efcf2f39868baeda974f9ec87aa Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Wed, 16 Nov 2005 00:42:56 +0000 Subject: [PATCH] fix DMX_SET_SOURCE call --- lib/dvb/demux.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/dvb/demux.cpp b/lib/dvb/demux.cpp index 6c783d38..d7fcaccf 100644 --- a/lib/dvb/demux.cpp +++ b/lib/dvb/demux.cpp @@ -50,7 +50,11 @@ RESULT eDVBDemux::setSourceFrontend(int fenum) { #if HAVE_DVB_API_VERSION >= 3 int fd = openDemux(); - int res = ::ioctl(fd, DMX_SET_SOURCE, DMX_SOURCE_FRONT0 + fenum); + + int n = DMX_SOURCE_FRONT0 + fenum; + int res = ::ioctl(fd, DMX_SET_SOURCE, &n); + if (res) + eDebug("DMX_SET_SOURCE failed! - %m"); ::close(fd); return res; #endif @@ -61,7 +65,8 @@ RESULT eDVBDemux::setSourcePVR(int pvrnum) { #if HAVE_DVB_API_VERSION >= 3 int fd = openDemux(); - int res = ::ioctl(fd, DMX_SET_SOURCE, DMX_SOURCE_DVR0 + pvrnum); + int n = DMX_SOURCE_DVR0 + pvrnum; + int res = ::ioctl(fd, DMX_SET_SOURCE, &n); ::close(fd); return res; #endif -- 2.30.2