changeset 8072:8e97c4629611

- 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.
author rguyom
date Sun, 03 Nov 2002 09:02:56 +0000
parents a7fa2d14ee91
children c0e556f9986b
files xvid_vbr.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xvid_vbr.c	Sun Nov 03 06:06:05 2002 +0000
+++ b/xvid_vbr.c	Sun Nov 03 09:02:56 2002 +0000
@@ -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);
@@ -611,6 +611,9 @@
 
 	}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);