diff --git a/modules/codec/x264.c b/modules/codec/x264.c index e291eaaa1270486ab9c4584f715fc9c52a7020bb..507244670125d919b26ca8d14d7317b0a8d0403d 100644 --- a/modules/codec/x264.c +++ b/modules/codec/x264.c @@ -437,8 +437,13 @@ vlc_module_begin () B_BIAS_LONGTEXT, false ) change_integer_range( -100, 100 ) +#if X264_BUILD >= 87 + add_string( SOUT_CFG_PREFIX "bpyramid", "normal", NULL, BPYRAMID_TEXT, + BPYRAMID_LONGTEXT, false ) +#else add_string( SOUT_CFG_PREFIX "bpyramid", "none", NULL, BPYRAMID_TEXT, BPYRAMID_LONGTEXT, false ) +#endif change_string_list( bpyramid_list, bpyramid_list, 0 ); add_bool( SOUT_CFG_PREFIX "cabac", true, NULL, CABAC_TEXT, CABAC_LONGTEXT, @@ -902,16 +907,19 @@ static int Open ( vlc_object_t *p_this ) p_sys->param.b_intra_refresh = var_GetBool( p_enc, SOUT_CFG_PREFIX "intra-refresh" ); psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "bpyramid" ); - if( strcmp( psz_val, "none" ) ) + if( !strcmp( psz_val, "normal" ) ) { - if ( !strcmp( psz_val, "strict" ) ) - { - p_sys->param.i_bframe_pyramid = X264_B_PYRAMID_STRICT; - } else if ( !strcmp( psz_val, "normal" ) ) - { - p_sys->param.i_bframe_pyramid = X264_B_PYRAMID_NORMAL; - } + p_sys->param.i_bframe_pyramid = X264_B_PYRAMID_NORMAL; } + else if ( !strcmp( psz_val, "strict" ) ) + { + p_sys->param.i_bframe_pyramid = X264_B_PYRAMID_STRICT; + } + else if ( !strcmp( psz_val, "none" ) ) + { + p_sys->param.i_bframe_pyramid = X264_B_PYRAMID_NONE; + } + free( psz_val ); i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "ref" );