aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/vdr-plugin-xvdr
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2011-12-20 03:27:52 +0800
committernox <nox@FreeBSD.org>2011-12-20 03:27:52 +0800
commiteb5d63c8e4aefde2d89e74efb6edcd858f5e0e59 (patch)
treed5a1a4f11b98cc2fc2304af80a5d3cc1c8e8a9b0 /multimedia/vdr-plugin-xvdr
parent37cfe235c3b9e5482bb97ed7367e9d825517ec2b (diff)
downloadfreebsd-ports-gnome-eb5d63c8e4aefde2d89e74efb6edcd858f5e0e59.tar.gz
freebsd-ports-gnome-eb5d63c8e4aefde2d89e74efb6edcd858f5e0e59.tar.zst
freebsd-ports-gnome-eb5d63c8e4aefde2d89e74efb6edcd858f5e0e59.zip
- Merge author's version of my zapping fix from git head.
- Bump PORTREVISION.
Diffstat (limited to 'multimedia/vdr-plugin-xvdr')
-rw-r--r--multimedia/vdr-plugin-xvdr/Makefile1
-rw-r--r--multimedia/vdr-plugin-xvdr/files/patch-81bde12cd5d36a5bb0f1bc5791977b58cc34f91e75
2 files changed, 76 insertions, 0 deletions
diff --git a/multimedia/vdr-plugin-xvdr/Makefile b/multimedia/vdr-plugin-xvdr/Makefile
index df8f06867daf..9bbe0bce776e 100644
--- a/multimedia/vdr-plugin-xvdr/Makefile
+++ b/multimedia/vdr-plugin-xvdr/Makefile
@@ -7,6 +7,7 @@
PORTNAME= vdr-plugin-xvdr
PORTVERSION= 0.9.5
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= LOCAL/nox/
DISTNAME= pipelka-${PORTNAME}-xvdr-${PORTVERSION}-0-g${GITHASH}
diff --git a/multimedia/vdr-plugin-xvdr/files/patch-81bde12cd5d36a5bb0f1bc5791977b58cc34f91e b/multimedia/vdr-plugin-xvdr/files/patch-81bde12cd5d36a5bb0f1bc5791977b58cc34f91e
new file mode 100644
index 000000000000..1e1939e3b0ee
--- /dev/null
+++ b/multimedia/vdr-plugin-xvdr/files/patch-81bde12cd5d36a5bb0f1bc5791977b58cc34f91e
@@ -0,0 +1,75 @@
+commit 81bde12cd5d36a5bb0f1bc5791977b58cc34f91e
+Author: Alexander Pipelka <alexander.pipelka@gmail.com>
+Date: Mon Dec 19 10:30:16 2011 +0100
+
+ wait until streaming stopped before switching to a new channel, thanks Juergen Lock
+
+diff --git a/src/xvdr/xvdrclient.c b/src/xvdr/xvdrclient.c
+index ced735e..8078454 100644
+--- a/src/xvdr/xvdrclient.c
++++ b/src/xvdr/xvdrclient.c
+@@ -72,6 +72,7 @@ static uint32_t recid2uid(const char* recid)
+ }
+
+ cMutex cXVDRClient::m_timerLock;
++cMutex cXVDRClient::m_switchLock;
+
+ cXVDRClient::cXVDRClient(int fd, unsigned int id, const char *ClientAdr)
+ {
+@@ -183,6 +184,7 @@ void cXVDRClient::Action(void)
+
+ bool cXVDRClient::StartChannelStreaming(const cChannel *channel, uint32_t timeout)
+ {
++ cMutexLock lock(&m_switchLock);
+ m_Streamer = new cLiveStreamer(timeout);
+ m_Streamer->SetLanguage(m_LanguageIndex, m_LangStreamType);
+
+@@ -192,12 +194,10 @@ bool cXVDRClient::StartChannelStreaming(const cChannel *channel, uint32_t timeou
+
+ void cXVDRClient::StopChannelStreaming()
+ {
++ cMutexLock lock(&m_switchLock);
++ delete m_Streamer;
++ m_Streamer = NULL;
+ m_isStreaming = false;
+- if (m_Streamer)
+- {
+- delete m_Streamer;
+- m_Streamer = NULL;
+- }
+ }
+
+ void cXVDRClient::TimerChange(const cTimer *Timer, eTimerChange Change)
+@@ -640,8 +640,7 @@ bool cXVDRClient::processChannelStream_Open() /* OPCODE 20 */
+ if(timeout == 0)
+ timeout = XVDRServerConfig.stream_timeout;
+
+- if (m_isStreaming)
+- StopChannelStreaming();
++ StopChannelStreaming();
+
+ Channels.Lock(false);
+ const cChannel *channel = NULL;
+@@ -679,9 +678,7 @@ bool cXVDRClient::processChannelStream_Open() /* OPCODE 20 */
+
+ bool cXVDRClient::processChannelStream_Close() /* OPCODE 21 */
+ {
+- if (m_isStreaming)
+- StopChannelStreaming();
+-
++ StopChannelStreaming();
+ return true;
+ }
+
+diff --git a/src/xvdr/xvdrclient.h b/src/xvdr/xvdrclient.h
+index e602c70..99bae64 100644
+--- a/src/xvdr/xvdrclient.h
++++ b/src/xvdr/xvdrclient.h
+@@ -64,6 +64,7 @@ private:
+ uint32_t m_protocolVersion;
+ cMutex m_msgLock;
+ static cMutex m_timerLock;
++ static cMutex m_switchLock;
+ int m_compressionLevel;
+ int m_LanguageIndex;
+ eStreamType m_LangStreamType;