aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2013-03-20 02:03:02 +0800
committernox <nox@FreeBSD.org>2013-03-20 02:03:02 +0800
commitafc1ae58ef9a71c5ec62bb58ba7329f5dc035082 (patch)
tree3b8f1409b238aed554ab26efa394f0c820e0ec72 /multimedia
parentea0ec921056f02904732160a7ea65ef2dbcd5d1e (diff)
downloadfreebsd-ports-gnome-afc1ae58ef9a71c5ec62bb58ba7329f5dc035082.tar.gz
freebsd-ports-gnome-afc1ae58ef9a71c5ec62bb58ba7329f5dc035082.tar.zst
freebsd-ports-gnome-afc1ae58ef9a71c5ec62bb58ba7329f5dc035082.zip
- Add fix for crashes when cutting. [1]
- Convert Makefile header. - Bump PORTREVISION. Reported by: gb+ML-2011@derbrauer.homelinux.net (Gerhard Brauer) [1]
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/vdr/Makefile8
-rw-r--r--multimedia/vdr/files/patch-z-cutter.c61
2 files changed, 63 insertions, 6 deletions
diff --git a/multimedia/vdr/Makefile b/multimedia/vdr/Makefile
index a33986730e30..33625c2d90ba 100644
--- a/multimedia/vdr/Makefile
+++ b/multimedia/vdr/Makefile
@@ -1,13 +1,9 @@
-# New ports collection makefile for: vdr
-# Date created: Wed Apr 14 18:11:42 CEST 2010
-# Whom: Juergen Lock <nox@freebsd.org>
-#
+# Created by: Juergen Lock <nox@freebsd.org>
# $FreeBSD$
-#
PORTNAME= vdr
PORTVERSION= 1.7.29
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/
diff --git a/multimedia/vdr/files/patch-z-cutter.c b/multimedia/vdr/files/patch-z-cutter.c
new file mode 100644
index 000000000000..39a4a731af12
--- /dev/null
+++ b/multimedia/vdr/files/patch-z-cutter.c
@@ -0,0 +1,61 @@
+--- cutter.c.orig
++++ cutter.c
+@@ -83,7 +83,18 @@ void cCuttingThread::Action(void)
+ int LastIFrame = 0;
+ toMarks.Add(0);
+ toMarks.Save();
++#ifdef __FreeBSD__
++ // XXX save thread stack space
++ uchar *buffer = MALLOC(uchar, MAXFRAMESIZE);
++ uchar *buffer2 = MALLOC(uchar, MAXFRAMESIZE);
++ if (buffer == NULL || buffer2 == NULL) {
++ free(buffer);
++ error = "malloc";
++ return;
++ }
++#else
+ uchar buffer[MAXFRAMESIZE], buffer2[MAXFRAMESIZE];
++#endif
+ int Length2;
+ bool CheckForSeamlessStream = false;
+ bool LastMark = false;
+@@ -108,7 +119,7 @@ void cCuttingThread::Action(void)
+ CurrentFileNumber = FileNumber;
+ }
+ if (fromFile) {
+- int len = ReadFrame(fromFile, buffer, Length, sizeof(buffer));
++ int len = ReadFrame(fromFile, buffer, Length, MAXFRAMESIZE);
+ if (len < 0) {
+ error = "ReadFrame";
+ break;
+@@ -193,7 +204,7 @@ void cCuttingThread::Action(void)
+ if (FileNumber != CurrentFileNumber)
+ fromFile = fromFileName->SetOffset(FileNumber, FileOffset);
+ if (fromFile) {
+- int len = ReadFrame(fromFile, buffer2, Length2, sizeof(buffer2));
++ int len = ReadFrame(fromFile, buffer2, Length2, MAXFRAMESIZE);
+ if (len >= 0 && len == Length2)
+ CheckForSeamlessStream = true;
+ }
+@@ -216,6 +227,10 @@ void cCuttingThread::Action(void)
+ }
+ }
+ Recordings.TouchUpdate();
++#ifdef __FreeBSD__
++ free(buffer);
++ free(buffer2);
++#endif
+ }
+ else
+ esyslog("no editing marks found!");
+--- thread.c.orig
++++ thread.c
+@@ -242,7 +242,7 @@ void cThread::SetPriority(int Priority)
+ void cThread::SetIOPriority(int Priority)
+ {
+ #ifdef __FreeBSD__
+- esyslog("ERROR: syscall(SYS_ioprio_set ...) unsupported on FreeBSD");
++ // esyslog("ERROR: syscall(SYS_ioprio_set ...) unsupported on FreeBSD");
+ #else
+ if (syscall(SYS_ioprio_set, 1, 0, (Priority & 0xff) | (2 << 13)) < 0) // best effort class
+ LOG_ERROR;