[MPlayer-cygwin] [PATCH] fix 2-pass encoding with libavcodec on win32, try 2

Tristan Seligmann mithrandi at mithrandi.za.net
Fri Sep 19 19:59:21 CEST 2003


On Fri, Sep 19, 2003 at 16:09:35 +0200, Sascha Sommer wrote:
> > Attached.
> 
> Where?
> 
> Sascha

Hmm. Looks like the attachement got removed somehow, let me try again.
-------------- next part --------------
--- clean/libmpcodecs/ve_lavc.c	2003-09-13 18:04:03.000000000 +0200
+++ main/libmpcodecs/ve_lavc.c	2003-09-19 03:18:38.000000000 +0200
@@ -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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cygwin/attachments/20030919/eebd44ac/attachment.pgp>


More information about the MPlayer-cygwin mailing list