changeset 7089:b7a1223fcef1

10l
author michael
date Sun, 25 Aug 2002 21:52:31 +0000
parents 9a0017ee11aa
children 43d7b60bd7f4
files libmpcodecs/ve_lavc.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c	Sun Aug 25 21:43:22 2002 +0000
+++ b/libmpcodecs/ve_lavc.c	Sun Aug 25 21:52:31 2002 +0000
@@ -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 LIBAVCODEC_BUILD >= 4620
     if(stats_file) fclose(stats_file);
-
-#if LIBAVCODEC_BUILD >= 4620
+    
     /* free rc_override */
     if(lavc_venc_context.rc_override) free(lavc_venc_context.rc_override);
     lavc_venc_context.rc_override= NULL;