Mercurial > libavcodec.hg
comparison mpegvideo_enc.c @ 5420:e5b6e68deadc libavcodec
warn user if max=bitrate && max > min
author | michael |
---|---|
date | Sun, 29 Jul 2007 19:21:56 +0000 |
parents | ef85411bb7e8 |
children | a40edc95456d |
comparison
equal
deleted
inserted
replaced
5419:67acef686665 | 5420:e5b6e68deadc |
---|---|
338 } | 338 } |
339 | 339 |
340 if(avctx->rc_max_rate && avctx->rc_max_rate < avctx->bit_rate){ | 340 if(avctx->rc_max_rate && avctx->rc_max_rate < avctx->bit_rate){ |
341 av_log(avctx, AV_LOG_INFO, "bitrate above max bitrate\n"); | 341 av_log(avctx, AV_LOG_INFO, "bitrate above max bitrate\n"); |
342 return -1; | 342 return -1; |
343 } | |
344 | |
345 if(avctx->rc_max_rate && avctx->rc_max_rate == avctx->bit_rate && avctx->rc_max_rate != avctx->rc_min_rate){ | |
346 av_log(avctx, AV_LOG_INFO, "impossible bitrate constraints, this will fail\n"); | |
343 } | 347 } |
344 | 348 |
345 if(avctx->rc_buffer_size && avctx->bit_rate*av_q2d(avctx->time_base) > avctx->rc_buffer_size){ | 349 if(avctx->rc_buffer_size && avctx->bit_rate*av_q2d(avctx->time_base) > avctx->rc_buffer_size){ |
346 av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); | 350 av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); |
347 return -1; | 351 return -1; |