changeset 5386:e93fc4a8851a

2-pass lavc encoding fixed
author arpi
date Fri, 29 Mar 2002 01:01:35 +0000
parents b2549a1b444c
children 44661cb881d0
files mencoder.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Fri Mar 29 00:06:35 2002 +0000
+++ b/mencoder.c	Fri Mar 29 01:01:35 2002 +0000
@@ -1219,7 +1219,7 @@
 
     switch(pass){
     case 1:
-	if (VbrControl_init_2pass_vbr_analysis(passtmpfile, lavc_param_vme) == -1)
+	if (VbrControl_init_2pass_vbr_analysis(passtmpfile, 5) == -1)
 	{
 	    printf("2pass failed: filename=%s\n", passtmpfile);
 	    pass_working = 0;
@@ -1230,15 +1230,17 @@
     case 2:
         if (VbrControl_init_2pass_vbr_encoding(passtmpfile,
 		    lavc_venc_context.bit_rate,
-		    lavc_venc_context.frame_rate,
+		    force_ofps?force_ofps:sh_video->fps,
 		    100, /* crispness */
-		    lavc_param_vme) == -1)
+		    5) == -1)
 	{
 	    printf("2pass failed: filename=%s\n", passtmpfile);
 	    pass_working = 0;
 	}
-	else
+	else {
 	    pass_working = 1;
+	    lavc_venc_context.flags |= CODEC_FLAG_QSCALE;
+	}
 	break;
     }