[FFmpeg-cvslog] avcodec/mpegvideo_enc: return proper error instead of failing assertion when max rate is not set
Michael Niedermayer
git at videolan.org
Tue Jul 15 20:14:05 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 15 18:49:18 2014 +0200| [19e5114eaad9631a4a7431a96857a0b03e164717] | committer: Michael Niedermayer
avcodec/mpegvideo_enc: return proper error instead of failing assertion when max rate is not set
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19e5114eaad9631a4a7431a96857a0b03e164717
---
libavcodec/mpegvideo_enc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 56867cc..9c4f2a5 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) {
More information about the ffmpeg-cvslog
mailing list