openbsd-ports/graphics/transcode/patches/patch-import_tcxmlcheck_c
sturm 55ff7d07a4 Initial import of transcode 0.6.12
transcode is a text console video-stream processing tool. 
It supports elementary video and audio frame transformations. 
Some example modules are included to enable import of MPEG-1/2, 
Digital Video, and other formats. It also includes export 
modules for writing to AVI files with DivX, OpenDivX, XviD,
Digital Video or other codecs. Direct DVD transcoding is also 
supported. A set of tools is available to extract and decode 
the sources into raw video/audio streams for import and to 
enable post-processing of AVI files.

from Waldemar Brodkorb and Jacob Meuser, maintained by
Waldemar Brodkorb <wbx at openbsd.de>
2004-06-18 18:56:42 +00:00

52 lines
1.8 KiB
Plaintext

$OpenBSD: patch-import_tcxmlcheck_c,v 1.1.1.1 2004/06/18 18:56:48 sturm Exp $
--- import/tcxmlcheck.c.orig 2004-04-29 19:48:45.000000000 -0700
+++ import/tcxmlcheck.c 2004-04-29 19:48:57.000000000 -0700
@@ -126,10 +126,10 @@ int main(int argc, char *argv[])
{
vob_t s_vob,*p_vob;
- char s_cmd,*p_in_v_file="/dev/stdin",*p_in_a_file=NULL,*p_audio_tmp=NULL,*p_video_tmp=NULL;
+ char *p_in_v_file="/dev/stdin",*p_in_a_file=NULL,*p_audio_tmp=NULL,*p_video_tmp=NULL;
pid_t s_pid;
int s_bin_dump=0,s_type_check=VIDEO_MODE|AUDIO_MODE,s_shmem=0;
- int s_shm,s_rc;
+ int s_shm,s_rc,s_cmd;
key_t s_key=0x00112233;
//proper initialization
@@ -193,6 +193,9 @@ int main(int argc, char *argv[])
if ((s_bin_dump) && (s_shmem))
{
+ if((s_shm = shmget(s_key, 0, 0600)) != -1)
+ shmctl(s_shm, IPC_RMID, NULL);
+
if((p_read(STDIN_FILENO, (char *) &s_vob, sizeof(vob_t))) != sizeof(vob_t))
{
fprintf(stderr,"(%s) Error reading data from stdin\n",EXE);
@@ -205,7 +208,7 @@ int main(int argc, char *argv[])
}
if ((p_vob=(vob_t *)shmat(s_shm,NULL,0)) == (vob_t *)-1)
{
- shmctl( s_shm, IPC_RMID, p_vob );
+ shmctl( s_shm, IPC_RMID, NULL );
(int) shmdt(p_vob);
fprintf(stderr,"(%s) Cannot attach shared memory segment\n",EXE);
exit(1);
@@ -223,13 +226,13 @@ int main(int argc, char *argv[])
}
if ((p_vob=(vob_t *)shmat(s_shm,NULL,0)) == (vob_t *)-1)
{
- shmctl( s_shm, IPC_RMID, p_vob );
+ shmctl( s_shm, IPC_RMID, NULL );
(int) shmdt(p_vob);
fprintf(stderr,"(%s) Cannot attach shared memory segment\n",EXE);
exit(1);
}
memcpy((char *)&s_vob,(char *) p_vob, sizeof(vob_t));
- shmctl( s_shm, IPC_RMID, p_vob );
+ shmctl( s_shm, IPC_RMID, NULL );
(int) shmdt(p_vob);
p_video_tmp=s_vob.video_in_file;
p_audio_tmp=s_vob.audio_in_file;