[SCM] vdr-plugin-vnsiserver/master: Import 4 upstream bug fix patches

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Sat Jan 3 10:08:01 UTC 2015


The following commit has been merged in the master branch:
commit a369ed4d13f802cf5a9741c658b7940ef15f0fd6
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Sat Jan 3 10:59:45 2015 +0100

    Import 4 upstream bug fix patches

diff --git a/debian/patches/0001-Add-usage-of-test-stream-over-command-line-arguments.patch b/debian/patches/0001-Add-usage-of-test-stream-over-command-line-arguments.patch
new file mode 100644
index 0000000..329b434
--- /dev/null
+++ b/debian/patches/0001-Add-usage-of-test-stream-over-command-line-arguments.patch
@@ -0,0 +1,103 @@
+From ef61e89b0d2486dc9dd4796aa9e8c0161ae43486 Mon Sep 17 00:00:00 2001
+From: AlwinEsch <alwin.esch at web.de>
+Date: Wed, 8 Oct 2014 04:51:59 +0200
+Subject: [PATCH 1/4] Add usage of test stream over command line arguments
+
+---
+ config.c   |  1 +
+ config.h   |  2 ++
+ streamer.c |  4 ++--
+ vnsi.c     | 18 ++++++++++++++++--
+ 4 files changed, 21 insertions(+), 4 deletions(-)
+
+diff --git a/config.c b/config.c
+index 0902728..5ce3549 100644
+--- a/config.c
++++ b/config.c
+@@ -36,6 +36,7 @@ cVNSIServerConfig::cVNSIServerConfig()
+   ConfigDirectory     = NULL;
+   stream_timeout      = 10;
+   device              = false;
++  testStreamActive    = false;
+ }
+ 
+ /* Global instance */
+diff --git a/config.h b/config.h
+index 176b3d4..50feb2e 100644
+--- a/config.h
++++ b/config.h
+@@ -79,6 +79,8 @@ public:
+   uint16_t listen_port;         // Port of remote server
+   uint16_t stream_timeout;      // timeout in seconds for stream data
+   bool device;                  // true if vnsi should act as dummy device
++  cString testStreamFile;       // TS file to simulate channel
++  bool testStreamActive;        // true if test mode is enabled
+ };
+ 
+ // Global instance
+diff --git a/streamer.c b/streamer.c
+index 277f576..6f5fa2f 100644
+--- a/streamer.c
++++ b/streamer.c
+@@ -88,10 +88,10 @@ bool cLiveStreamer::Open(int serial)
+     return false;
+ 
+   bool recording = false;
+-  if (0) // test harness
++  if (VNSIServerConfig.testStreamActive) // test harness
+   {
+     recording = true;
+-    m_VideoBuffer = cVideoBuffer::Create("/home/xbmc/test.ts");
++    m_VideoBuffer = cVideoBuffer::Create(VNSIServerConfig.testStreamFile);
+   }
+   else if (PlayRecording && serial == -1)
+   {
+diff --git a/vnsi.c b/vnsi.c
+index ca6005e..e90cb89 100644
+--- a/vnsi.c
++++ b/vnsi.c
+@@ -45,7 +45,8 @@ cPluginVNSIServer::~cPluginVNSIServer()
+ 
+ const char *cPluginVNSIServer::CommandLineHelp(void)
+ {
+-    return "  -t n, --timeout=n      stream data timeout in seconds (default: 10)\n";
++    return "  -t n, --timeout=n      stream data timeout in seconds (default: 10)\n"
++           "  -s n, --test=n         TS stream test file to simulate as channel\n";
+ }
+ 
+ bool cPluginVNSIServer::ProcessArgs(int argc, char *argv[])
+@@ -54,17 +55,30 @@ bool cPluginVNSIServer::ProcessArgs(int argc, char *argv[])
+   static struct option long_options[] = {
+        { "timeout",  required_argument, NULL, 't' },
+        { "device",   no_argument,       NULL, 'd' },
++       { "test",     required_argument, NULL, 'T' },
+        { NULL,       no_argument,       NULL,  0  }
+      };
+ 
+   int c;
+ 
+-  while ((c = getopt_long(argc, argv, "t:d", long_options, NULL)) != -1) {
++  while ((c = getopt_long(argc, argv, "t:d:T:", long_options, NULL)) != -1) {
+         switch (c) {
+           case 't': if(optarg != NULL) VNSIServerConfig.stream_timeout = atoi(optarg);
+                     break;
+           case 'd': VNSIServerConfig.device = true;
+                     break;
++          case 'T': if(optarg != NULL) {
++                    VNSIServerConfig.testStreamFile = optarg;
++
++                    struct stat file_stat;
++                    if (stat(VNSIServerConfig.testStreamFile, &file_stat) == 0) {
++                      VNSIServerConfig.testStreamActive = true;
++                      printf("vnsiserver: requested test stream file '%s' played now on all channels\n", *VNSIServerConfig.testStreamFile);
++                      }
++                    else
++                      printf("vnsiserver: requested test stream file '%s' not present, started without\n", *VNSIServerConfig.testStreamFile);
++                      }
++                    break;
+           default:  return false;
+           }
+         }
+-- 
+2.1.4
+
diff --git a/debian/patches/0002-fix-command-line-parameter-d.patch b/debian/patches/0002-fix-command-line-parameter-d.patch
new file mode 100644
index 0000000..7c5e849
--- /dev/null
+++ b/debian/patches/0002-fix-command-line-parameter-d.patch
@@ -0,0 +1,33 @@
+From 5de5f011d5ab1070f0c1a535032b8ddf70247749 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Sun, 21 Dec 2014 10:48:51 +0100
+Subject: [PATCH 2/4] fix command line parameter -d
+
+---
+ vnsi.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vnsi.c b/vnsi.c
+index e90cb89..9eff27e 100644
+--- a/vnsi.c
++++ b/vnsi.c
+@@ -46,6 +46,7 @@ cPluginVNSIServer::~cPluginVNSIServer()
+ const char *cPluginVNSIServer::CommandLineHelp(void)
+ {
+     return "  -t n, --timeout=n      stream data timeout in seconds (default: 10)\n"
++           "  -d  , --device         act as the primary device\n"
+            "  -s n, --test=n         TS stream test file to simulate as channel\n";
+ }
+ 
+@@ -61,7 +62,7 @@ bool cPluginVNSIServer::ProcessArgs(int argc, char *argv[])
+ 
+   int c;
+ 
+-  while ((c = getopt_long(argc, argv, "t:d:T:", long_options, NULL)) != -1) {
++  while ((c = getopt_long(argc, argv, "t:dT:", long_options, NULL)) != -1) {
+         switch (c) {
+           case 't': if(optarg != NULL) VNSIServerConfig.stream_timeout = atoi(optarg);
+                     break;
+-- 
+2.1.4
+
diff --git a/debian/patches/0003-fix-conversion-warning.patch b/debian/patches/0003-fix-conversion-warning.patch
new file mode 100644
index 0000000..563e23a
--- /dev/null
+++ b/debian/patches/0003-fix-conversion-warning.patch
@@ -0,0 +1,25 @@
+From 3ef54f37460caba81cfb96ed8f80ac715b4133a3 Mon Sep 17 00:00:00 2001
+From: Kenodai <me at kenodai.eu>
+Date: Wed, 24 Dec 2014 23:24:41 +0100
+Subject: [PATCH 3/4] fix conversion warning
+
+---
+ responsepacket.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/responsepacket.c b/responsepacket.c
+index a0188d4..439dfa7 100644
+--- a/responsepacket.c
++++ b/responsepacket.c
+@@ -213,7 +213,7 @@ bool cResponsePacket::copyin(const uint8_t* src, uint32_t len)
+ }
+ 
+ uint8_t* cResponsePacket::reserve(uint32_t len) {
+-  if (!checkExtend(len)) return false;
++  if (!checkExtend(len)) return 0;
+   uint8_t* result = buffer + bufUsed;
+   bufUsed += len;
+   return result;
+-- 
+2.1.4
+
diff --git a/debian/patches/0004-fix-potential-segfault-on-stop-streaming.patch b/debian/patches/0004-fix-potential-segfault-on-stop-streaming.patch
new file mode 100644
index 0000000..2209673
--- /dev/null
+++ b/debian/patches/0004-fix-potential-segfault-on-stop-streaming.patch
@@ -0,0 +1,28 @@
+From a48edf135fa7422570290c84a59213b58f457c95 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Thu, 1 Jan 2015 15:40:48 +0100
+Subject: [PATCH 4/4] fix potential segfault on stop streaming
+
+---
+ videoinput.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/videoinput.c b/videoinput.c
+index 9b1842b..d7e45eb 100644
+--- a/videoinput.c
++++ b/videoinput.c
+@@ -491,9 +491,11 @@ void cVideoInput::Close()
+     }
+   }
+   m_Channel = NULL;
++  m_Device = NULL;
+   if (m_VideoBuffer)
+   {
+     m_VideoBuffer->AttachInput(false);
++    m_VideoBuffer = NULL;
+   }
+ }
+ 
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..30e3250
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+0001-Add-usage-of-test-stream-over-command-line-arguments.patch
+0002-fix-command-line-parameter-d.patch
+0003-fix-conversion-warning.patch
+0004-fix-potential-segfault-on-stop-streaming.patch

-- 
vdr-plugin-vnsiserver packaging



More information about the pkg-multimedia-commits mailing list