[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.23,1.24

Michael Niedermayer michael at mplayerhq.hu
Sun Aug 25 23:52:34 CEST 2002


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

Modified Files:
	ve_lavc.c 
Log Message:
10l


Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- ve_lavc.c	25 Aug 2002 21:43:10 -0000	1.23
+++ ve_lavc.c	25 Aug 2002 21:52:31 -0000	1.24
@@ -275,14 +275,17 @@
 #endif
     case 1: 
 	lavc_venc_context.flags|= CODEC_FLAG_PASS1; 
+#if LIBAVCODEC_BUILD >= 4620
 	stats_file= fopen(passtmpfile, "w");
 	if(stats_file==NULL){
 	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
             return 0;
 	}
+#endif
 	break;
     case 2:
 	lavc_venc_context.flags|= CODEC_FLAG_PASS2; 
+#if LIBAVCODEC_BUILD >= 4620
 	stats_file= fopen(passtmpfile, "r");
 	if(stats_file==NULL){
 	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
@@ -298,8 +301,8 @@
 	if(fread(lavc_venc_context.stats_in, size, 1, stats_file)<1){
 	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: reading from filename=%s\n", passtmpfile);
             return 0;
-	}
-        
+	}        
+#endif
 	break;
     }
 
@@ -423,9 +426,9 @@
 static void uninit(struct vf_instance_s* vf){
     avcodec_close(&lavc_venc_context);
 
-    if(stats_file) fclose(stats_file);
-
 #if LIBAVCODEC_BUILD >= 4620
+    if(stats_file) fclose(stats_file);
+    
     /* free rc_override */
     if(lavc_venc_context.rc_override) free(lavc_venc_context.rc_override);
     lavc_venc_context.rc_override= NULL;




More information about the MPlayer-cvslog mailing list