[MPlayer-dev-eng] lavc 2 pass mode patch
Johannes E. Schindelin
Johannes.Schindelin at gmx.de
Mon Apr 28 15:10:40 CEST 2003
Hi,
I noticed a problem where an mpeg2 stream triggered twice a "vo config".
In this case, the stats_file is opened twice for writing. The first config
happens at the start of the mpeg2 stream, the second at the end.
The effect: The stats_file is opened for the first time. A lot of lines
are written. Then the file is opened a second time, a few lines are
written at the start, the file is closed only once and filled with '\0'.
The proposed patch just ignores the second attempt to open the stats_file.
Ciao,
Dscho
-------------- next part --------------
diff -u -r1.61 ve_lavc.c
--- libmpcodecs/ve_lavc.c 26 Apr 2003 16:47:25 -0000 1.61
+++ libmpcodecs/ve_lavc.c 28 Apr 2003 10:12:10 -0000
@@ -414,6 +414,7 @@
mp_msg(MSGT_MENCODER,MSGL_ERR,"%s is not a supported format\n", lavc_param_format);
return 0;
}
+ if(!stats_file) {
/* lavc internal 2pass bitrate control */
switch(lavc_param_vpass){
case 1:
@@ -444,6 +445,7 @@
}
break;
}
+ }
lavc_venc_context->me_method = ME_ZERO+lavc_param_vme;
More information about the MPlayer-dev-eng
mailing list