[Mplayer-cvslog] CVS: main xvid_vbr.c,1.2,1.3

Rémi Guyomarch CVS rguyom at mplayerhq.hu
Sun Nov 3 10:03:18 CET 2002


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

Modified Files:
	xvid_vbr.c 
Log Message:
- When a frame is in the ending credits zone, say so.

- delete one space (cosmetic)

- From the FreeBSD fopen manpage :

     ANSI C requires that a file positioning function intervene
     between output and input, unless an input operation encounters
     end-of-file.



Index: xvid_vbr.c
===================================================================
RCS file: /cvsroot/mplayer/main/xvid_vbr.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xvid_vbr.c	18 Sep 2002 01:32:32 -0000	1.2
+++ xvid_vbr.c	3 Nov 2002 09:02:56 -0000	1.3
@@ -111,7 +111,7 @@
 
 		if(state->cur_frame >= state->credits_end_begin &&
 		   state->cur_frame < state->credits_end_end)
-			return(FRAME_TYPE_STARTING_CREDITS);
+			return(FRAME_TYPE_ENDING_CREDITS);
 
 	}
 
@@ -601,7 +601,7 @@
 	/* Goto to the file beginning */
 	fseek(state->pass1_file, 0, SEEK_SET);
 
-	/* Skip the version line  and the empty line */
+	/* Skip the version line and the empty line */
 	c = i = 0;
 	do {
 		c = fgetc(state->pass1_file);
@@ -610,6 +610,9 @@
 		if(c == '\n') i++;
 
 	}while(i < 2);
+
+	/* Prepare to write to the stream */
+	fseek( state->pass1_file, ftell( state->pass1_file ), SEEK_SET );
 
 	/* Overwrite the frame field - safe as we have written extra spaces */
 	fprintf(state->pass1_file, "# frames    : %.10d\n", state->nb_frames);




More information about the MPlayer-cvslog mailing list