summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-07-29 19:21:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-07-29 19:21:56 +0000
commit3dd2a1c53f6678b1e30606116d835ee73238ae08 (patch)
tree7df5381132666b27f53d967d34e301f49287530d /libavcodec/mpegvideo_enc.c
parent611e7bc41b58421af70e525e2a9debc30d68a2be (diff)
warn user if max=bitrate && max > min
Originally committed as revision 9829 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 1f630d48c8..cd0ab9b39d 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -342,6 +342,10 @@ int MPV_encode_init(AVCodecContext *avctx)
return -1;
}
+ if(avctx->rc_max_rate && avctx->rc_max_rate == avctx->bit_rate && avctx->rc_max_rate != avctx->rc_min_rate){
+ 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){
av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n");
return -1;