[Mplayer-cvslog] CVS: main mencoder.c,1.132,1.133

Atmosfear atmos4 at mplayerhq.hu
Thu Jun 13 23:35:13 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv25752

Modified Files:
	mencoder.c 
Log Message:
On QNX eof szmbol clashes with system headers, workaround by renaming to at_eof. Fell free to reverse if zou don't like this waz.


Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- mencoder.c	7 Jun 2002 22:40:06 -0000	1.132
+++ mencoder.c	13 Jun 2002 21:35:10 -0000	1.133
@@ -244,8 +244,8 @@
 
 int dec_audio(sh_audio_t *sh_audio,unsigned char* buffer,int total){
     int size=0;
-    int eof=0;
-    while(size<total && !eof){
+    int at_eof=0;
+    while(size<total && !at_eof){
 	int len=total-size;
 		if(len>MAX_OUTBURST) len=MAX_OUTBURST;
 		if(len>sh_audio->a_buffer_size) len=sh_audio->a_buffer_size;
@@ -254,7 +254,7 @@
 			&sh_audio->a_buffer[sh_audio->a_buffer_len],
     			len-sh_audio->a_buffer_len,
 			sh_audio->a_buffer_size-sh_audio->a_buffer_len);
-		    if(ret>0) sh_audio->a_buffer_len+=ret; else eof=1;
+		    if(ret>0) sh_audio->a_buffer_len+=ret; else at_eof=1;
 		}
 		if(len>sh_audio->a_buffer_len) len=sh_audio->a_buffer_len;
 		memcpy(buffer+size,sh_audio->a_buffer,len);
@@ -269,7 +269,7 @@
 
 //---------------------------------------------------------------------------
 
-static int eof=0;
+static int at_eof=0;
 static int interrupted=0;
 
 enum end_at_type_t {END_AT_NONE, END_AT_TIME, END_AT_SIZE};
@@ -277,7 +277,7 @@
 static int end_at;
 
 static void exit_sighandler(int x){
-    eof=1;
+    at_eof=1;
     interrupted=1;
 }
 
@@ -796,7 +796,7 @@
 	default_max_pts_correction = 0;
 	}
 
-while(!eof){
+while(!at_eof){
 
     float frame_time=0;
     int blit_frame=0;
@@ -892,7 +892,7 @@
     // get video frame!
 
     in_size=video_read_frame(sh_video,&frame_time,&start,force_fps);
-    if(in_size<0){ eof=1; break; }
+    if(in_size<0){ at_eof=1; break; }
     sh_video->timer+=frame_time; ++decoded_frameno;
 
     v_timer_corr-=frame_time-(float)mux_v->h.dwScale/mux_v->h.dwRate;
@@ -902,22 +902,22 @@
 	while(next_frameno<decoded_frameno){
 	    int* start;
 	    int len=ds_get_packet(demuxer2->video,(unsigned char**) &start);
-	    if(len<0){ eof=1;break;}
+	    if(len<0){ at_eof=1;break;}
 	    if(len==0) --skip_flag; else  // duplicate
 	    if(len==4) next_frameno=start[0];
 	}
-    if(eof) break;
+    if(at_eof) break;
 	// if(skip_flag) printf("!!!!!!!!!!!!\n");
 	skip_flag=next_frameno-decoded_frameno;
     // find next frame:
 	while(next_frameno<=decoded_frameno){
 	    int* start;
 	    int len=ds_get_packet(demuxer2->video,(unsigned char**) &start);
-	    if(len<0){ eof=1;break;}
+	    if(len<0){ at_eof=1;break;}
 	    if(len==0) --skip_flag; else  // duplicate
 	    if(len==4) next_frameno=start[0];
 	}
-//    if(eof) break;
+//    if(at_eof) break;
 //	    printf("Current fno=%d  requested=%d  skip=%d  \n",decoded_frameno,fno,skip_flag);
 } else {
 
@@ -1105,7 +1105,7 @@
      mencoder_exit(1, NULL);
  }
 
-} // while(!eof)
+} // while(!at_eof)
 
 #ifdef HAVE_MP3LAME
 // fixup CBR mp3 audio header:




More information about the MPlayer-cvslog mailing list