changeset 5420:e5b6e68deadc libavcodec

warn user if max=bitrate && max > min
author michael
date Sun, 29 Jul 2007 19:21:56 +0000
parents 67acef686665
children 0e593c7d0ebc
files mpegvideo_enc.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo_enc.c	Sun Jul 29 13:32:53 2007 +0000
+++ b/mpegvideo_enc.c	Sun Jul 29 19:21:56 2007 +0000
@@ -342,6 +342,10 @@
         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;