Revision f7f8120f libavcodec/libx264.c

View differences:

libavcodec/libx264.c
277 277
    if (avctx->level > 0)
278 278
        x4->params.i_level_idc = avctx->level;
279 279

  
280
    if ((avctx->rc_buffer_size != 0) &&
280
    if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy &&
281 281
        (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) {
282 282
        x4->params.rc.f_vbv_buffer_init =
283 283
            (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size;
284
    } else
285
        x4->params.rc.f_vbv_buffer_init = 0.9;
284
    }
286 285

  
287 286
    x4->params.rc.b_mb_tree               = !!(avctx->flags2 & CODEC_FLAG2_MBTREE);
288 287
    x4->params.rc.f_ip_factor             = 1 / fabs(avctx->i_quant_factor);

Also available in: Unified diff