[vlc-devel] commit: x264.c: set vbv max bitrate to bitrate if doing cbr (Ilkka Ollakka )

git version control git at videolan.org
Tue Jul 21 16:15:26 CEST 2009


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Jul 21 14:03:58 2009 +0300| [cce5f9e2b898d31065a9821607efc6873c98db90] | committer: Ilkka Ollakka 

x264.c: set vbv max bitrate to bitrate if doing cbr

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cce5f9e2b898d31065a9821607efc6873c98db90
---

 modules/codec/x264.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 4b4c1b1..9376998 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -872,7 +872,12 @@ static int  Open ( vlc_object_t *p_this )
 
     /* max bitrate = average bitrate -> CBR */
     var_Get( p_enc, SOUT_CFG_PREFIX "vbv-maxrate", &val );
-    p_sys->param.rc.i_vbv_max_bitrate = val.i_int;
+#if X264_BUILD >= 48
+    if( !val.i_int && p_sys->param.rc.i_rc_method == X264_RC_ABR )
+        p_sys->param.rc.i_vbv_max_bitrate = p_sys->param.rc.i_bitrate;
+    else
+#endif
+        p_sys->param.rc.i_vbv_max_bitrate = val.i_int;
 
 #else
     p_sys->param.rc.i_rc_buffer_size = p_sys->param.rc.i_bitrate;




More information about the vlc-devel mailing list