By default libav sets it to 3/4 while x264 sets it to 9/10. CC: libav-stable@libav.org
Unified · Split
| @@ -272,7 +272,7 @@ static av_cold int X264_init(AVCodecContext *avctx) · 271 unmodified lines | ||
| 272 | 272 | x4->params.rc.f_rf_constant_max = x4->crf_max; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | − if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy && | |
| 275 | + if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy > 0 && | |
| 276 | 276 | (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) { |
| 277 | 277 | x4->params.rc.f_vbv_buffer_init = |
| 278 | 278 | (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size; |
| @@ -560,6 +560,7 @@ static const AVCodecDefault x264_defaults[] = { · 281 unmodified lines | ||
| 560 | 560 | { "threads", AV_STRINGIFY(X264_THREADS_AUTO) }, |
| 561 | 561 | { "thread_type", "0" }, |
| 562 | 562 | { "flags", "+cgop" }, |
| 563 | + { "rc_init_occupancy","-1" }, | |
| 563 | 564 | { NULL }, |
| 564 | 565 | }; |
| 565 | 566 | |