]> git.sesse.net Git - vlc/commitdiff
* compilation fix to reflect x264's API change in its revision 537 (x264 build 48)
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 20 Jul 2006 19:16:52 +0000 (19:16 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 20 Jul 2006 19:16:52 +0000 (19:16 +0000)
It would be nice if someone with more x264-knowledge could review this.

modules/codec/x264.c

index 5eaa036a02fbe4ea03c472214546b5f7d5cc98ad..e00bbd1b9c729d0ad0ad41e4b04e6703297e1cd6 100644 (file)
@@ -586,9 +586,13 @@ static int  Open ( vlc_object_t *p_this )
     /* average bitrate specified by transcode vb */
     p_sys->param.rc.i_bitrate = p_enc->fmt_out.i_bitrate / 1000;
 
+#if X264_BUILD < 48
     /* cbr = 1 overrides qp or crf and sets an average bitrate
        but maxrate = average bitrate is needed for "real" CBR */
     if( p_sys->param.rc.i_bitrate > 0 ) p_sys->param.rc.b_cbr = 1;
+#else
+    if( p_sys->param.rc.i_bitrate > 0 ) p_sys->param.rc.i_rc_method = X264_RC_ABR;
+#endif
 
     var_Get( p_enc, SOUT_CFG_PREFIX "qpstep", &val );
     if( val.i_int >= 0 && val.i_int <= 51 ) p_sys->param.rc.i_qp_step = val.i_int;