CVS: main asfheader.c,1.21,1.22 dec_video.c,1.27,1.28 demux_avi.c,1.25,1.26 demuxer.c,1.25,1.26 dll_init.c,1.25,1.26 network.c,1.6,1.7 url.c,1.6,1.7
Update of /cvsroot/mplayer/main In directory mplayer:/var/tmp.root/cvs-serv25996 Modified Files: asfheader.c dec_video.c demux_avi.c demuxer.c dll_init.c network.c url.c Log Message: exit() -> return NULL Index: asfheader.c =================================================================== RCS file: /cvsroot/mplayer/main/asfheader.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- asfheader.c 17 Aug 2001 00:40:25 -0000 1.21 +++ asfheader.c 22 Aug 2001 19:40:46 -0000 1.22 @@ -160,7 +160,7 @@ if(streamh.type_size>1024 || streamh.stream_size>1024){ mp_msg(MSGT_HEADER,MSGL_FATAL,"FATAL: header size bigger than 1024 bytes!\n" "Please contact mplayer authors, and upload/send this file.\n"); - exit(1); + return 0; } // type-specific data: stream_read(demuxer->stream,(char*) buffer,streamh.type_size); Index: dec_video.c =================================================================== RCS file: /cvsroot/mplayer/main/dec_video.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- dec_video.c 17 Aug 2001 00:40:25 -0000 1.27 +++ dec_video.c 22 Aug 2001 19:40:46 -0000 1.28 @@ -150,7 +150,6 @@ case VFM_VFW: { if(!init_video_codec(sh_video,0)) { // GUI_MSG( mplUnknowError ) -// exit(1); return 0; } mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n"); @@ -159,7 +158,6 @@ case VFM_VFWEX: { if(!init_video_codec(sh_video,1)) { // GUI_MSG( mplUnknowError ) -// exit(1); return 0; } mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32Ex video codec init OK!\n"); @@ -170,7 +168,6 @@ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT directshow support!\n"); return 0; // GUI_MSG( mplCompileWithoutDSSupport ) -// exit(1); #else int bpp; if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){ @@ -188,7 +185,6 @@ // usec_sleep( 10000 ); // } // #endif -// exit(1); } switch(out_fmt){ @@ -247,7 +243,7 @@ case VFM_DIVX4: { // DivX4Linux #ifndef NEW_DECORE mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT DivX4Linux (libdivxdecore.so) support!\n"); - return 0; //exit(1); + return 0; #else mp_msg(MSGT_DECVIDEO,MSGL_V,"DivX4Linux video codec\n"); { DEC_PARAM dec_param; @@ -282,7 +278,7 @@ case VFM_FFMPEG: { // FFmpeg's libavcodec #ifndef USE_LIBAVCODEC mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT libavcodec support!\n"); - return 0; //exit(1); + return 0; #else mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n"); avcodec_init(); @@ -290,7 +286,7 @@ lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_video->codec->dll); if(!lavc_codec){ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Can't find codec '%s' in libavcodec...\n",sh_video->codec->dll); - return 0; //exit(1); + return 0; } memset(&lavc_context, 0, sizeof(lavc_context)); // sh_video->disp_h/=2; // !! @@ -300,7 +296,7 @@ /* open it */ if (avcodec_open(&lavc_context, lavc_codec) < 0) { mp_msg(MSGT_DECVIDEO,MSGL_ERR, "could not open codec\n"); - return 0; //exit(1); + return 0; } mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: libavcodec init OK!\n"); @@ -580,7 +576,6 @@ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: FATAL: EOF while searching for sequence header\n"); return 0; // GUI_MSG( mplMPEGErrorSeqHeaderSearch ) -// exit(1); } } mp_msg(MSGT_DECVIDEO,MSGL_V,"OK!\n"); @@ -592,20 +587,17 @@ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory\n"); return 0; // GUI_MSG( mplErrorShMemAlloc ) -// exit(0); } videobuf_len=0; if(!read_video_packet(d_video)){ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header!\n"); return 0; // GUI_MSG( mplMPEGErrorCannotReadSeqHeader ) -// exit(1); } if(header_process_sequence_header (picture, &videobuffer[4])) { mp_msg(MSGT_DECVIDEO,MSGL_ERR,"bad sequence header!\n"); return 0; // GUI_MSG( mplMPEGErrorBadSeqHeader ) -// exit(1); } if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext. // videobuf_len=0; @@ -614,13 +606,11 @@ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header extension!\n"); return 0; // GUI_MSG( mplMPEGErrorCannotReadSeqHeaderExt ) -// exit(1); } if(header_process_extension (picture, &videobuffer[pos+4])) { mp_msg(MSGT_DECVIDEO,MSGL_ERR,"bad sequence header extension!\n"); return 0; // GUI_MSG( mplMPEGErrorBadSeqHeaderExt ) -// exit(1); } } // display info: @@ -629,7 +619,7 @@ if(!sh_video->fps){ // if(!force_fps){ // fprintf(stderr,"FPS not specified (or invalid) in the header! Use the -fps option!\n"); -// return 0; //exit(1); +// return 0; // } sh_video->frametime=0; } else { Index: demux_avi.c =================================================================== RCS file: /cvsroot/mplayer/main/demux_avi.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- demux_avi.c 22 Aug 2001 19:03:15 -0000 1.25 +++ demux_avi.c 22 Aug 2001 19:40:46 -0000 1.26 @@ -412,7 +412,6 @@ mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: missing video stream!? contact the author, it may be a bug :(\n"); return NULL; // GUI_MSG( mplErrorAVINI ) -// exit(1); } if(a_pos==-1){ mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI_NI: No audio stream found -> nosound\n"); @@ -439,7 +438,6 @@ mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI: missing video stream!? contact the author, it may be a bug :(\n"); return NULL; // GUI_MSG( mplAVIErrorMissingVideoStream ) -// exit(1); } sh_video=d_video->sh;sh_video->ds=d_video; if(d_audio->id!=-2){ Index: demuxer.c =================================================================== RCS file: /cvsroot/mplayer/main/demuxer.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- demuxer.c 22 Aug 2001 19:03:15 -0000 1.25 +++ demuxer.c 22 Aug 2001 19:40:46 -0000 1.26 @@ -399,7 +399,6 @@ mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized); return NULL; // GUI_MSG( mplUnknowFileType ) -// exit(1); } //====== File format recognized, set up these for compatibility: ========= d_audio=demuxer->audio; @@ -429,7 +428,6 @@ sh_video=NULL; //printf("ASF: missing video stream!? contact the author, it may be a bug :(\n"); //GUI_MSG( mplASFErrorMissingVideoStream ) - //exit(1); } else { sh_video=d_video->sh;sh_video->ds=d_video; sh_video->fps=1000.0f; sh_video->frametime=0.001f; // 1ms Index: dll_init.c =================================================================== RCS file: /cvsroot/mplayer/main/dll_init.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- dll_init.c 17 Aug 2001 00:40:25 -0000 1.25 +++ dll_init.c 22 Aug 2001 19:40:46 -0000 1.26 @@ -34,9 +34,6 @@ sh_audio->srcstream=NULL; -// if(in_fmt->nSamplesPerSec==0){ printf("Bad WAVE header!\n");exit(1); } -// MSACM_RegisterAllDrivers(); - sh_audio->o_wf.nChannels=in_fmt->nChannels; sh_audio->o_wf.nSamplesPerSec=in_fmt->nSamplesPerSec; sh_audio->o_wf.nAvgBytesPerSec=2*sh_audio->o_wf.nSamplesPerSec*sh_audio->o_wf.nChannels; Index: network.c =================================================================== RCS file: /cvsroot/mplayer/main/network.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- network.c 1 Aug 2001 09:14:02 -0000 1.6 +++ network.c 22 Aug 2001 19:40:46 -0000 1.7 @@ -474,7 +474,7 @@ ret = select( streaming_ctrl->fd_net+1, &fd_net_in, NULL, NULL, NULL ); if( ret<0 ) { perror("select"); - exit(1); + return; //exit(1); // FIXME! } if( FD_ISSET( streaming_ctrl->fd_net, &fd_net_in ) ) { ret = readFromServer( streaming_ctrl->fd_net, buffer, BUFFER_SIZE ); Index: url.c =================================================================== RCS file: /cvsroot/mplayer/main/url.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- url.c 15 Aug 2001 12:44:05 -0000 1.6 +++ url.c 22 Aug 2001 19:40:46 -0000 1.7 @@ -23,7 +23,7 @@ Curl = (URL_t*)malloc(sizeof(URL_t)); if( Curl==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } // Initialisation of the URL container members memset( Curl, 0, sizeof(URL_t) ); @@ -32,7 +32,7 @@ Curl->url = (char*)malloc(strlen(url)+1); if( Curl->url==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strcpy(Curl->url, url); @@ -71,7 +71,7 @@ Curl->hostname = (char*)malloc(pos2-pos1-3+1); if( Curl->hostname==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strncpy(Curl->hostname, ptr1+3, pos2-pos1-3); Curl->hostname[pos2-pos1-3] = '\0'; @@ -86,7 +86,7 @@ Curl->file = (char*)malloc(strlen(ptr2)+1); if( Curl->file==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strcpy(Curl->file, ptr2); } @@ -96,7 +96,7 @@ Curl->file = (char*)malloc(2); if( Curl->file==NULL ) { printf("Memory allocation failed!\n"); - exit(1); + return NULL; } strcpy(Curl->file, "/"); }
participants (1)
-
Arpi of Ize