mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
mpegvideoenc: Fail if a buffer size is specified without a max rate.
This combination makes not much sense. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
49f2056289
commit
f21b6159cf
@ -392,10 +392,8 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
|||||||
s->obmc = !!(s->flags & CODEC_FLAG_OBMC);
|
s->obmc = !!(s->flags & CODEC_FLAG_OBMC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (avctx->rc_max_rate && !avctx->rc_buffer_size) {
|
if ((!avctx->rc_max_rate) != (!avctx->rc_buffer_size)) {
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR, "Either both buffer size and max rate or neither must be specified\n");
|
||||||
"a vbv buffer size is needed, "
|
|
||||||
"for encoding with a maximum bitrate\n");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user