1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Add fix for crashes when cutting. [1]

- Convert Makefile header.
- Bump PORTREVISION.

Reported by:	gb+ML-2011@derbrauer.homelinux.net (Gerhard Brauer) [1]
This commit is contained in:
Juergen Lock 2013-03-19 18:03:02 +00:00
parent c2ecbb4d3b
commit e0a98cf5c8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=314671
2 changed files with 63 additions and 6 deletions

View File

@ -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/

View File

@ -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;