Browse Source

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>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
f21b6159cf
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      libavcodec/mpegvideo_enc.c

+ 2
- 4
libavcodec/mpegvideo_enc.c View File

@@ -392,10 +392,8 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
s->obmc = !!(s->flags & CODEC_FLAG_OBMC);
#endif

if (avctx->rc_max_rate && !avctx->rc_buffer_size) {
av_log(avctx, AV_LOG_ERROR,
"a vbv buffer size is needed, "
"for encoding with a maximum bitrate\n");
if ((!avctx->rc_max_rate) != (!avctx->rc_buffer_size)) {
av_log(avctx, AV_LOG_ERROR, "Either both buffer size and max rate or neither must be specified\n");
return -1;
}



Loading…
Cancel
Save