changeset 10881:6c3555f4c5c3

fix 2-pass encoding with libavcodec onwin32, patch by Tristan Seligmann <mithrandi-mplayer-dev-eng at mithrandi.za.net>
author faust3
date Fri, 19 Sep 2003 18:45:02 +0000
parents ba9557e864c0
children e46e5a6c53b8
files libmpcodecs/ve_lavc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c	Fri Sep 19 14:33:51 2003 +0000
+++ b/libmpcodecs/ve_lavc.c	Fri Sep 19 18:45:02 2003 +0000
@@ -504,7 +504,7 @@
     switch(lavc_param_vpass){
     case 1: 
 	lavc_venc_context->flags|= CODEC_FLAG_PASS1; 
-	stats_file= fopen(passtmpfile, "w");
+	stats_file= fopen(passtmpfile, "wb");
 	if(stats_file==NULL){
 	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
             return 0;
@@ -512,7 +512,7 @@
 	break;
     case 2:
 	lavc_venc_context->flags|= CODEC_FLAG_PASS2; 
-	stats_file= fopen(passtmpfile, "r");
+	stats_file= fopen(passtmpfile, "rb");
 	if(stats_file==NULL){
 	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
             return 0;