|
@@ -351,7 +351,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) |
|
|
av_log(avctx, AV_LOG_INFO, "impossible bitrate constraints, this will fail\n"); |
|
|
av_log(avctx, AV_LOG_INFO, "impossible bitrate constraints, this will fail\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(avctx->rc_buffer_size && avctx->bit_rate*av_q2d(avctx->time_base) > avctx->rc_buffer_size){ |
|
|
|
|
|
|
|
|
if(avctx->rc_buffer_size && avctx->bit_rate*(int64_t)avctx->time_base.num > avctx->rc_buffer_size * (int64_t)avctx->time_base.den){ |
|
|
av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); |
|
|
av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); |
|
|
return -1; |
|
|
return -1; |
|
|
} |
|
|
} |
|
|