diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 18:49:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 19:56:19 +0200 |
commit | 19e5114eaad9631a4a7431a96857a0b03e164717 (patch) | |
tree | b38e3feee5fb221cfedb2059ceb833988a9a399d /libavcodec/mpegvideo_enc.c | |
parent | 01c17b5224ce0c9899a58f639ef6611fe626ef5f (diff) | |
download | ffmpeg-19e5114eaad9631a4a7431a96857a0b03e164717.tar.gz |
avcodec/mpegvideo_enc: return proper error instead of failing assertion when max rate is not set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 56867ccb85..9c4f2a5d11 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -388,8 +388,7 @@ 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"); - if (avctx->rc_max_rate && !avctx->rc_buffer_size) - return -1; + return -1; } if (avctx->rc_min_rate && avctx->rc_max_rate != avctx->rc_min_rate) { |