Browse Source

libavcodec: be less picky on nonsense rc_max_rate / rc_buffer_size combinations.

Some applications use these combinations and to maintain ABI
compatibility with previous versions we should not suddenly
fail. Thus only display a warning for the newly detected cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
c450cf1572
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/mpegvideo_enc.c

+ 2
- 1
libavcodec/mpegvideo_enc.c View File

@@ -390,7 +390,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)

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;
if (avctx->rc_max_rate && !avctx->rc_buffer_size)
return -1;
}

if (avctx->rc_min_rate && avctx->rc_max_rate != avctx->rc_min_rate) {


Loading…
Cancel
Save