summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-12 01:31:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-12 01:31:11 +0000
commitbf873ee62ad21d02576348c834ae23f4b26dcecb (patch)
treee91d162f927e5e81870e088f411ed59653ae6672 /libavcodec
parent49d40989ff9e39f5be27ed9dc00c12a2861d98a0 (diff)
b_frame_strategy sanity check
Originally committed as revision 4222 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 1426c221f9..bb06083960 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1065,6 +1065,11 @@ int MPV_encode_init(AVCodecContext *avctx)
return -1;
}
+ if(avctx->b_frame_strategy && (avctx->flags&CODEC_FLAG_PASS2)){
+ av_log(avctx, AV_LOG_ERROR, "b_frame_strategy must be 0 on the second pass");
+ return -1;
+ }
+
i= ff_gcd(avctx->time_base.den, avctx->time_base.num);
if(i > 1){
av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n");