Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
The primary focus of MPEG encoding algorithms is 1) To create fast
and efficient motion vector search techniques and 2) To find "good"
encoding parameters that provide a balance of encoding speed,
compression and quality.
The Berkeley encoder accelerates the process by parallelizing in
the temporal direction. The overall organization of the encoder is
shown in Figure 2. The Master server is the overall coordinator.
It allocates groups of frames to the Slave servers for encoding.
The sharing of the files is achieved best, if the directories
containing the video files are NFS mounted and accessible uniformly
to all processors (alternatively they can be sent out though sockets
by the Master). The various activities are managed by inter process
communication through sockets.

View File

@@ -0,0 +1,42 @@
# $NetBSD: Makefile,v 1.17 2012/10/08 09:21:09 asau Exp $
#
DISTNAME= mpeg_encode-1.5b-src
PKGNAME= ${DISTNAME:S/-src//}
PKGREVISION= 6
CATEGORIES= multimedia net
MASTER_SITES= ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/encode/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_encode.html
COMMENT= The Parallel Berkeley MPEG Encoder
WRKSRC= ${WRKDIR}/mpeg_encode
USE_TOOLS+= gmake
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
post-build:
@cd ${WRKSRC}/convert && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/mpeg_encode ${DESTDIR}${PREFIX}/bin
.for i in eyuvtojpeg jmovie2jpeg mpeg_demux
${INSTALL_PROGRAM} ${WRKSRC}/convert/${i} ${DESTDIR}${PREFIX}/bin
.endfor
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/mpeg_encode
.for i in EXTENSIONS INPUT.FORMAT mpeg_encode.1 parallel.param param-summary \
template.param users-guide.fm users-guide.mif users-guide.ps
${INSTALL_DATA} ${WRKSRC}/docs/${i} \
${DESTDIR}${PREFIX}/share/doc/mpeg_encode
.endfor
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/mpeg_encode
cd ${WRKSRC}/examples ; for i in * ; do \
${INSTALL_DATA} $$i \
${DESTDIR}${PREFIX}/share/examples/mpeg_encode; \
done
${INSTALL_MAN} ${WRKSRC}/docs/mpeg_encode.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.include "../../mk/jpeg.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,166 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:08:08 joerg Exp $
bin/eyuvtojpeg
bin/jmovie2jpeg
bin/mpeg_demux
bin/mpeg_encode
man/man1/mpeg_encode.1
share/doc/mpeg_encode/EXTENSIONS
share/doc/mpeg_encode/INPUT.FORMAT
share/doc/mpeg_encode/mpeg_encode.1
share/doc/mpeg_encode/parallel.param
share/doc/mpeg_encode/param-summary
share/doc/mpeg_encode/template.param
share/doc/mpeg_encode/users-guide.fm
share/doc/mpeg_encode/users-guide.mif
share/doc/mpeg_encode/users-guide.ps
share/examples/mpeg_encode/basicspeed.param
share/examples/mpeg_encode/decoded.test
share/examples/mpeg_encode/decoded2.test
share/examples/mpeg_encode/decorig.param
share/examples/mpeg_encode/default.param
share/examples/mpeg_encode/fastspeed.param
share/examples/mpeg_encode/foobar.param
share/examples/mpeg_encode/frame.test
share/examples/mpeg_encode/gop.combine
share/examples/mpeg_encode/gop.test
share/examples/mpeg_encode/gop1.param
share/examples/mpeg_encode/hello.param
share/examples/mpeg_encode/i.test
share/examples/mpeg_encode/ispeed.jpeg.param
share/examples/mpeg_encode/ispeed.param
share/examples/mpeg_encode/jpeg.test
share/examples/mpeg_encode/jpeg19.param
share/examples/mpeg_encode/jpegout19.param
share/examples/mpeg_encode/localdisk.param
share/examples/mpeg_encode/localremote.test
share/examples/mpeg_encode/luxo.param
share/examples/mpeg_encode/luxo18.param
share/examples/mpeg_encode/luxo19.5.param
share/examples/mpeg_encode/luxo19.param
share/examples/mpeg_encode/luxo2.param
share/examples/mpeg_encode/luxo48.param
share/examples/mpeg_encode/luxo49.param
share/examples/mpeg_encode/luxo50.param
share/examples/mpeg_encode/luxo52.5.param
share/examples/mpeg_encode/luxo52.param
share/examples/mpeg_encode/luxo53.param
share/examples/mpeg_encode/luxobug.param
share/examples/mpeg_encode/luxoskip.param
share/examples/mpeg_encode/med.param
share/examples/mpeg_encode/med18.param
share/examples/mpeg_encode/medspeed.param
share/examples/mpeg_encode/nametest.param
share/examples/mpeg_encode/nosearch.param
share/examples/mpeg_encode/par3.param
share/examples/mpeg_encode/par4.param
share/examples/mpeg_encode/par5.param
share/examples/mpeg_encode/parallel.2
share/examples/mpeg_encode/parallel.param
share/examples/mpeg_encode/parallel.test
share/examples/mpeg_encode/param.template
share/examples/mpeg_encode/payam.param
share/examples/mpeg_encode/payam18.param
share/examples/mpeg_encode/pnm.param
share/examples/mpeg_encode/ppm.param
share/examples/mpeg_encode/prof.b.param
share/examples/mpeg_encode/prof.bhalf.param
share/examples/mpeg_encode/prof.param
share/examples/mpeg_encode/prof.ss.param
share/examples/mpeg_encode/prof2.param
share/examples/mpeg_encode/prof3.param
share/examples/mpeg_encode/prof4.param
share/examples/mpeg_encode/remote.test
share/examples/mpeg_encode/search1.param
share/examples/mpeg_encode/search10.param
share/examples/mpeg_encode/search11.param
share/examples/mpeg_encode/search12.param
share/examples/mpeg_encode/search13.param
share/examples/mpeg_encode/search14.param
share/examples/mpeg_encode/search15.param
share/examples/mpeg_encode/search16.param
share/examples/mpeg_encode/search17.param
share/examples/mpeg_encode/search18.param
share/examples/mpeg_encode/search19.5.param
share/examples/mpeg_encode/search19.param
share/examples/mpeg_encode/search2.param
share/examples/mpeg_encode/search20.param
share/examples/mpeg_encode/search21.param
share/examples/mpeg_encode/search22.param
share/examples/mpeg_encode/search23.param
share/examples/mpeg_encode/search24.param
share/examples/mpeg_encode/search25.param
share/examples/mpeg_encode/search26.param
share/examples/mpeg_encode/search27.param
share/examples/mpeg_encode/search28.param
share/examples/mpeg_encode/search29.param
share/examples/mpeg_encode/search3.param
share/examples/mpeg_encode/search30.param
share/examples/mpeg_encode/search31.param
share/examples/mpeg_encode/search32.param
share/examples/mpeg_encode/search33.param
share/examples/mpeg_encode/search34.param
share/examples/mpeg_encode/search35.param
share/examples/mpeg_encode/search36.param
share/examples/mpeg_encode/search37.param
share/examples/mpeg_encode/search38.param
share/examples/mpeg_encode/search39.param
share/examples/mpeg_encode/search4.param
share/examples/mpeg_encode/search40.param
share/examples/mpeg_encode/search41.param
share/examples/mpeg_encode/search42.param
share/examples/mpeg_encode/search43.param
share/examples/mpeg_encode/search44.param
share/examples/mpeg_encode/search45.param
share/examples/mpeg_encode/search46.param
share/examples/mpeg_encode/search47.param
share/examples/mpeg_encode/search48.param
share/examples/mpeg_encode/search49.param
share/examples/mpeg_encode/search5.param
share/examples/mpeg_encode/search50.param
share/examples/mpeg_encode/search51.param
share/examples/mpeg_encode/search52.5.param
share/examples/mpeg_encode/search52.param
share/examples/mpeg_encode/search53.param
share/examples/mpeg_encode/search6.param
share/examples/mpeg_encode/search7.param
share/examples/mpeg_encode/search8.param
share/examples/mpeg_encode/search9.param
share/examples/mpeg_encode/seq.param
share/examples/mpeg_encode/sequoia.param
share/examples/mpeg_encode/sequoia19.param
share/examples/mpeg_encode/sequoia2.param
share/examples/mpeg_encode/slice.param
share/examples/mpeg_encode/slimed.param
share/examples/mpeg_encode/slowspeed.param
share/examples/mpeg_encode/stanford.param
share/examples/mpeg_encode/subtest.param
share/examples/mpeg_encode/temp.param
share/examples/mpeg_encode/template.param
share/examples/mpeg_encode/tennis.param
share/examples/mpeg_encode/tennis18.param
share/examples/mpeg_encode/tennis19.5.param
share/examples/mpeg_encode/tennis19.param
share/examples/mpeg_encode/tennis48.param
share/examples/mpeg_encode/tennis49.param
share/examples/mpeg_encode/tennis50.param
share/examples/mpeg_encode/tennis52.5.param
share/examples/mpeg_encode/tennis52.param
share/examples/mpeg_encode/tennis53.param
share/examples/mpeg_encode/tennisbug.param
share/examples/mpeg_encode/testp.param
share/examples/mpeg_encode/walk.param
share/examples/mpeg_encode/walk1.param
share/examples/mpeg_encode/walk18.param
share/examples/mpeg_encode/walk19.5.param
share/examples/mpeg_encode/walk19.param
share/examples/mpeg_encode/walk2.param
share/examples/mpeg_encode/walk3.param
share/examples/mpeg_encode/walk4.param
share/examples/mpeg_encode/walk48.param
share/examples/mpeg_encode/walk49.param
share/examples/mpeg_encode/walk5.param
share/examples/mpeg_encode/walk50.param
share/examples/mpeg_encode/walk52.5.param
share/examples/mpeg_encode/walk52.param
share/examples/mpeg_encode/walk53.param
share/examples/mpeg_encode/walk93.param

View File

@@ -0,0 +1,20 @@
$NetBSD: distinfo,v 1.9 2012/11/01 19:40:08 joerg Exp $
SHA1 (mpeg_encode-1.5b-src.tar.gz) = 853cd175f73b8064ce28deb256e4b81159a684ed
RMD160 (mpeg_encode-1.5b-src.tar.gz) = 24c0a1090076630c292936639c5fb275778f6470
Size (mpeg_encode-1.5b-src.tar.gz) = 2028724 bytes
SHA1 (patch-aa) = 04221eb3d4cf85b206d27a2f425719ed7c4a5ec1
SHA1 (patch-ab) = 19fcf1b6ef88f3cdba29a71eb619e467fa621f4f
SHA1 (patch-ac) = 152c0bd7737a307d1aa89ae820e219300c124085
SHA1 (patch-ad) = 670a244680d09cb9f558a8777ec8f189145342f8
SHA1 (patch-ae) = 414b8c45c65892b9e161c285c5c0327103f8f474
SHA1 (patch-ag) = 8014bf6347a3c95d279f989c027fb2c90e33aa6e
SHA1 (patch-ah) = 9620a042e0b571986e6ce6cb6f5f837b1109020f
SHA1 (patch-ai) = 209f802d46e84c30545629079e386374d110dbf5
SHA1 (patch-aj) = 56031b467679ce4e2ae6bcddbdb129cd8cead479
SHA1 (patch-ak) = f28929b16bb804c691565adbe3f4c1814154ced7
SHA1 (patch-al) = be13795b7db10224974f222ce174fb1305d0e582
SHA1 (patch-am) = 983546e7384fc96f0f182ae23bf5ddd19f7a0008
SHA1 (patch-an) = 69e70b75b558637b3a2afb612871f7d4a8538c92
SHA1 (patch-ao) = a771c6445fb792f0ea0fd41710302601d45d81fe
SHA1 (patch-ap) = b5ff080731790d0478c0f285204aa010668f23c3

View File

@@ -0,0 +1,35 @@
$NetBSD: patch-aa,v 1.1.1.1 2004/02/24 21:47:25 jmmv Exp $
--- Makefile.orig Thu Aug 17 00:16:56 1995
+++ Makefile
@@ -36,9 +36,9 @@
##############
# JPEG STUFF #
##############
-JPEG_LIB = jpeg/libjpeg.a
-JPEG_DIR = -Ijpeg
-JPEG_LIB_DIR = -Ljpeg
+JPEG_LIB = -ljpeg
+JPEG_DIR =
+JPEG_LIB_DIR =
MP_JPEG_OBJS = jpeg.o
MP_JPEG_SRCS = jpeg.c
@@ -57,7 +57,7 @@
#################
# INCLUDE FILES #
#################
-INCLUDEDIR = -Iheaders -I/usr/include $(JPEG_DIR)
+INCLUDEDIR = -Iheaders $(JPEG_DIR)
############################################################################
# LIBRARIES # specify library directories; need jpg lib and maybe pbm #
@@ -203,7 +203,7 @@
############
mpeg_encode: $(MP_ALL_OBJS) $(JPEG_LIB)
- $(PURIFY) $(CC) $(CFLAGS) -o $@ $(MP_ALL_OBJS) $(LIBDIRS) $(LIBS)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ $(MP_ALL_OBJS) $(LIBDIRS) $(LIBS)
strip mpeg_encode
profile: $(MP_ALL_OBJS)

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-ab,v 1.3 2011/09/12 16:52:56 taca Exp $
--- jpeg.c.orig 1995-08-04 23:35:07.000000000 +0000
+++ jpeg.c
@@ -65,6 +65,7 @@
*==============*/
#include <stdio.h>
+#include <unistd.h>
#include "all.h"
#include "mtypes.h"
#include "frames.h"
@@ -77,7 +78,7 @@
/* make it happier.... */
#undef DCTSIZE2
-#include "jpeg/jpeglib.h"
+#include "jpeglib.h" /* Use system header! */
#define HEADER_SIZE 607 /*JFIF header size used on output images*/
@@ -514,7 +515,11 @@ ReadJPEG(mf, fp)
#ifdef JPEG4
buffer_height = 8; /* could be 2, 4,8 rows high */
#else
+# if JPEG_LIB_VERSION < 80
buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
+# else
+ buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_v_scaled_size;
+# endif
#endif
for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-ac,v 1.2 2006/01/03 14:20:41 joerg Exp $
--- libpnmrw.c.orig 1995-08-16 22:24:26.000000000 +0000
+++ libpnmrw.c
@@ -28,6 +28,7 @@
#endif
#include <stdio.h>
+#include <errno.h>
#include "libpnmrw.h"
/* if don't have string.h, try strings.h */
@@ -126,8 +127,9 @@ static void
pm_perror( reason )
char* reason;
{
+#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__FreeBSD__)
extern char* sys_errlist[];
- extern int errno;
+#endif
char* e;
e = sys_errlist[errno];

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ad,v 1.1.1.1 2004/02/24 21:47:25 jmmv Exp $
--- docs/mpeg_encode.1.orig Thu Mar 30 00:15:09 1995
+++ docs/mpeg_encode.1
@@ -368,6 +368,8 @@
This is version 1.5 it contins new features and bug fixes from version 1.3.
.SH BUGS
No known bugs, but if you find any, report them to mpeg-bugs@plateau.cs.berkeley.edu.
+If you experience problems in the jpeg code, it is advisable to use another
+input format. This problem is documented in NetBSD PR pkg/14043.
.HP
.SH AUTHORS
.HP

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-ae,v 1.2 2005/10/05 11:45:46 salo Exp $
--- ../convert/jmovie2jpeg.c.orig 1995-01-20 00:29:24.000000000 +0000
+++ ../convert/jmovie2jpeg.c
@@ -283,12 +283,12 @@ static char inbuffer[300000] = {
if (fread (&(image_offset),sizeof(int),1,inFile) != 1)
{
perror("Error in reading image offset");
- exit();
+ exit(1);
}
if (fread (&(audio_tracks),sizeof(int),1,inFile) != 1)
{
perror("Error in reading audio tracks");
- exit();
+ exit(1);
}
if (audio_tracks != 1)
{

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-ag,v 1.2 2007/07/30 10:25:42 joerg Exp $
--- opts.c.orig 1995-08-15 18:34:09.000000000 +0000
+++ opts.c
@@ -37,9 +37,9 @@
#include <stdio.h>
#include <string.h>
-#include "opts.h"
-#include <malloc.h>
+#include <stdlib.h>
#include <math.h>
+#include "opts.h"
/*==============*
* EXTERNALS *

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-ah,v 1.3 2012/11/01 19:40:08 joerg Exp $
--- ../convert/eyuvtojpeg.c.orig 1995-04-14 21:16:52.000000000 +0000
+++ ../convert/eyuvtojpeg.c
@@ -24,7 +24,7 @@
*==============*/
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
+#include <unistd.h>
typedef unsigned char uint8;
@@ -43,11 +43,12 @@ void ReadYUV(FILE *fp);
void AllocYCC(void);
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
FILE *fpointer;
- char command[256];
- char src[256], dest[256];
+ char command[4096];
+ char src[4096], dest[4096], tempfile[4096];
+ int ret;
if ((strcmp(argv[1],"-?") == 0) ||
(strcmp(argv[1],"-h") == 0) ||
@@ -98,13 +99,16 @@ void main(int argc, char **argv)
YUVtoPPM();
fprintf(stdout, "Writing PPM\n");
- fpointer = fopen("/tmp/foobar", "w");
+ sprintf(tempfile, "%s.tmp", dest);
+ fpointer = fopen(tempfile, "w");
WritePPM(fpointer);
fclose(fpointer);
fprintf(stdout, "Converting to JPEG %s\n", dest);
- sprintf(command, "cjpeg /tmp/foobar > %s", dest);
- system(command);
+ sprintf(command, "cjpeg %s > %s", tempfile, dest);
+ ret = system(command);
+ unlink(tempfile);
+ return ret;
}

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-ai,v 1.2 2007/07/30 10:25:42 joerg Exp $
Fix for SA17008, from Gentoo.
--- ../convert/eyuvtoppm.c.orig 1995-04-14 21:16:52.000000000 +0000
+++ ../convert/eyuvtoppm.c
@@ -24,7 +24,6 @@
*==============*/
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
typedef unsigned char uint8;
@@ -99,13 +98,9 @@ void main(int argc, char **argv)
fpointer = fopen(dest, "w");
if (fpointer == NULL) {
fprintf(stderr, "Problems opening %s!\n", dest);
- fprintf(stderr, "Trying /tmp/foobar instead\n");
- strcpy(dest, "/tmp/foobar");
- fpointer = fopen(dest, "w");
- if (fpointer == NULL) {
- fprintf(stderr, "Nope, exiting.\n");
+ perror("");
exit(1);
- }}
+ }
WritePPM(fpointer);
fclose(fpointer);

View File

@@ -0,0 +1,44 @@
$NetBSD: patch-aj,v 1.1 2005/10/05 11:45:46 salo Exp $
Fix for SA17008, from Gentoo.
--- ../convert/vidtoeyuv.c.orig 1995-01-20 04:25:39.000000000 +0100
+++ ../convert/vidtoeyuv.c 2005-10-05 13:16:27.000000000 +0200
@@ -125,9 +125,9 @@
XImage *ximage;
char *tdata;
char *obase;
- char ofname[256];
+ char ofname[4096], tempfile[4096];
int height, width;
- char command[256];
+ char command[4096];
int nth;
if ((argc != 7) && (argc != 8))usage (argv[0]);
@@ -223,9 +223,11 @@
sprintf(ofname, "%s%d.yuv", obase, i);
- outFile = fopen("/tmp/foobar", "w");
+ sprintf(tempfile, "%s%d.yuv.tmp", obase, i);
+ outFile = fopen(tempfile, "w");
if (!outFile) {
perror("Couldn't open output file.");
+ exit(1);
}
for (r=0; r<height; r++) {
@@ -241,9 +243,10 @@
free(tdata);
- sprintf(command, "rawtoppm %d %d < /tmp/foobar | ppmtoyuv > %s",
- width, height, ofname);
+ sprintf(command, "rawtoppm %d %d < %s | ppmtoyuv > %s",
+ width, height, tempfile, ofname);
system(command);
+ unlink(tempfile);
for (j=0; j<nth-1; j++) {
if (read (fd, &image, sizeof(image)) != sizeof(image)) {

View File

@@ -0,0 +1,44 @@
$NetBSD: patch-ak,v 1.1 2005/10/05 11:45:46 salo Exp $
Fix for SA17008, from Gentoo.
--- ../convert/vidtojpeg.c.orig 1995-01-20 04:25:40.000000000 +0100
+++ ../convert/vidtojpeg.c 2005-10-05 13:16:27.000000000 +0200
@@ -123,9 +123,9 @@
XImage *ximage;
char *tdata;
char *obase;
- char ofname[256];
+ char ofname[4096], tempfile[4096];
int height, width;
- char command[256];
+ char command[4096];
if ((argc != 7) && (argc != 8))usage (argv[0]);
@@ -221,9 +221,11 @@
sprintf(ofname, "%s.%d.jpeg", obase, i);
- outFile = fopen("/tmp/foobar", "w");
+ sprintf(tempfile, "%s.%d.jpeg.tmp", obase, i);
+ outFile = fopen(tempfile, "w");
if (!outFile) {
perror("Couldn't open output file.");
+ exit(1);
}
for (r=0; r<height; r++) {
@@ -239,9 +241,10 @@
free(tdata);
- sprintf(command, "rawtoppm %d %d < /tmp/foobar | cjpeg > %s",
- width, height, ofname);
+ sprintf(command, "rawtoppm %d %d < %s | cjpeg > %s",
+ width, height, tempfile, ofname);
system(command);
+ unlink(tempfile);
}
}

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-al,v 1.1 2005/10/05 11:45:46 salo Exp $
Fix for SA17008, from Gentoo.
--- ../convert/vidtoppm.c.orig 1995-01-20 04:25:40.000000000 +0100
+++ ../convert/vidtoppm.c 2005-10-05 13:16:27.000000000 +0200
@@ -220,9 +220,11 @@
sprintf(ofname, "%s%d.ppm", obase, i);
- outFile = fopen("/tmp/foobar", "w");
+ sprintf(tempfile, "%s%d.ppm.tmp", obase, i);
+ outFile = fopen(tempfile, "w");
if (!outFile) {
perror("Couldn't open output file.");
+ exit(1);
}
for (r=0; r<height; r++) {
@@ -238,8 +240,9 @@
free(tdata);
- sprintf(command, "rawtoppm %d %d < /tmp/foobar > %s",
- width, height, ofname);
+ sprintf(command, "rawtoppm %d %d < %s > %s",
+ width, height, tempfile, ofname);
system(command);
+ unlink(tempfile);
}
}

View File

@@ -0,0 +1,46 @@
$NetBSD: patch-am,v 1.1 2005/10/05 11:45:46 salo Exp $
Fix for SA17008, from Gentoo.
--- parallel.c.orig 1995-08-16 20:22:11.000000000 +0200
+++ parallel.c 2005-10-05 13:25:40.000000000 +0200
@@ -586,6 +586,8 @@
* SIDE EFFECTS: none
*
*===========================================================================*/
+/* internal hook into the ReadFrame function */
+void _ReadFrame(MpegFrame *frame, char *fileName, FILE *fileHook, char *conversion, boolean addPath);
void
GetRemoteFrame(frame, frameNumber)
MpegFrame *frame;
@@ -615,8 +617,13 @@
if ( frameNumber != -1 ) {
if ( separateConversion ) {
- sprintf(fileName, "/tmp/foobar%d", machineNumber);
- filePtr = fopen(fileName, "wb");
+ int fd;
+ snprintf(fileName, sizeof(fileName), "/tmp/mpeg_encode_foobar%dXXXXXX", machineNumber);
+ fd = mkstemp(fileName);
+ if (fd == -1 || (filePtr = fdopen(fd, "wb")) == NULL) {
+ perror("ERROR: mpeg_encode->GetRemoteFrame");
+ exit(1);
+ }
/* read in stuff, SafeWrite to file, perform local conversion */
do {
@@ -628,10 +635,12 @@
fwrite(smallBuffer, 1, numBytes, filePtr);
} while ( numBytes == 1000 );
fflush(filePtr);
- fclose(filePtr);
+ rewind(filePtr);
/* now do slave conversion */
- ReadFrame(frame, fileName, slaveConversion, FALSE);
+ _ReadFrame(frame, NULL, filePtr, slaveConversion, FALSE);
+ /* _ReadFrame() will close the file pointer for us */
+ /* fclose(filePtr); */
} else {
Frame_AllocYCC(frame);

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-an,v 1.1 2005/10/05 11:45:46 salo Exp $
Fix for SA17008, from Gentoo.
--- readframe.c.orig 1995-08-15 00:31:58.000000000 +0200
+++ readframe.c 2005-10-05 13:25:40.000000000 +0200
@@ -227,14 +227,22 @@
* SIDE EFFECTS: none
*
*===========================================================================*/
+void _ReadFrame(MpegFrame *frame, char *fileName, FILE *fileHook, char *conversion, boolean addPath);
+
+void ReadFrame(MpegFrame *frame, char *fileName, char *conversion, boolean addPath)
+{
+ _ReadFrame(frame, fileName, NULL, conversion, addPath);
+}
+
void
-ReadFrame(frame, fileName, conversion, addPath)
+_ReadFrame(frame, fileName, fileHook, conversion, addPath)
MpegFrame *frame;
char *fileName;
+ FILE *fileHook;
char *conversion;
boolean addPath;
{
- FILE *ifp;
+ FILE *ifp = fileHook;
char command[1024];
char fullFileName[1024];
MpegFrame tempFrame;
@@ -274,6 +282,9 @@
}
#endif
+ if (fileHook)
+ goto file_is_already_opened;
+
if ( fileType == ANY_FILE_TYPE ) {
char *convertPtr, *commandPtr, *charPtr;
@@ -325,6 +336,7 @@
exit(1);
}
+file_is_already_opened:
switch(baseFormat) {
case YUV_FILE_TYPE:

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-ao,v 1.1 2006/01/03 14:20:41 joerg Exp $
--- headers/libpnmrw.h.orig 2006-01-03 14:15:10.000000000 +0000
+++ headers/libpnmrw.h
@@ -13,18 +13,7 @@
#ifndef _PNMRW_H_
#define _PNMRW_H_
-/* CONFIGURE: On some systems, malloc.h doesn't declare these, so we have
-** to do it. On other systems, for example HP/UX, it declares them
-** incompatibly. And some systems, for example Dynix, don't have a
-** malloc.h at all. A sad situation. If you have compilation problems
-** that point here, feel free to tweak or remove these declarations.
-*/
-#include <malloc.h>
-#if !defined(sco) && !defined(sgi) && !defined(IRIX)
-extern char* malloc();
-#endif
-/* End of configurable definitions. */
-
+#include <stdlib.h>
/* Definitions to make PBMPLUS work with either ANSI C or C Classic. */

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-ap,v 1.1 2007/07/30 10:25:42 joerg Exp $
--- ../convert/mpeg_demux.c.orig 2007-07-30 10:08:47.000000000 +0000
+++ ../convert/mpeg_demux.c
@@ -19,7 +19,6 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>