1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/multimedia/mjpegtools/files/patch-mplex_main.cpp
Edwin Groothuis 71e512b8a8 [patch] multimedia/mjpegtools - update to 1.9rc1
The current mjpegtools (mpeg2enc for example) is dumping core way
	too often to be able to do useful media conversions.

	This version has been running on my system for two weeks now and
	it works much better.

portrevision bump for multimedia/lives multimedia/mjpegtools-yuvfilters
multimedia/y4mscaler since they have LIB_DEPENDS on this port. Other
ports having RUN_DEPENDS on this port are not bumped.

PR:		ports/113878
Submitted by:	Edwin Groothuis <edwin@mavetju.org>
Approved by:	Michael Johnson <ahze@ahze.net>
2007-06-21 01:35:39 +00:00

55 lines
1.2 KiB
C++

--- mplex/main.cpp.orig Wed Jun 20 13:40:39 2007
+++ mplex/main.cpp Wed Jun 20 13:41:49 2007
@@ -38,6 +38,7 @@
#endif
#include <ctype.h>
#include <math.h>
+#include <fcntl.h>
#include "cpu_accel.h"
#include "mjpeg_types.h"
#include "mjpeg_logging.h"
@@ -107,6 +108,14 @@
{
mjpeg_error_exit1( "Could not open for writing: %s", cur_filename );
}
+ {
+ int flags;
+
+ (void)fcntl(fileno(strm), F_GETFL, &flags);
+ (void)fcntl(fileno(strm), F_SETFL, flags & ~O_NONBLOCK);
+ }
+
+
return 0;
}
@@ -143,6 +152,13 @@
mjpeg_error_exit1( "Could not open for writing: %s", cur_filename );
}
segment_len = 0;
+ {
+ int flags;
+
+ (void)fcntl(fileno(strm), F_GETFL, &flags);
+ (void)fcntl(fileno(strm), F_SETFL, flags & ~O_NONBLOCK);
+ }
+
}
void
@@ -200,6 +216,14 @@
{
mjpeg_error_exit1( "Unable to open file %s for reading.", bs_filename);
}
+
+ {
+ int flags;
+
+ (void)fcntl(fileno(fileh), F_GETFL, &flags);
+ (void)fcntl(fileno(fileh), F_SETFL, flags & ~O_NONBLOCK);
+ }
+
filename = strcpy( new char[strlen(bs_filename)+1], bs_filename );
streamname = filename;