diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-02-27 15:23:19 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-02-29 10:11:02 +0400 |
commit | a249f0cc23457bc73a249e1b1ca22adcfe5b0894 (patch) | |
tree | 86ee5bc4444e24cdd5befcd7e854b032b32c28b6 /libavcodec/mpegvideo_enc.c | |
parent | ed019b8e5bfefe59e307ce01f2860777e037b94b (diff) |
mpegvideo_enc: add strict_gop flag to mpv_flags.
Deprecate CODEC_FLAG2_STRICT_GOP.
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 8e502ed62c..d21ced7d59 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -614,6 +614,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) #if FF_API_MPV_GLOBAL_OPTS if (avctx->flags2 & CODEC_FLAG2_SKIP_RD) s->mpv_flags |= FF_MPV_FLAG_SKIP_RD; + if (avctx->flags2 & CODEC_FLAG2_STRICT_GOP) + s->mpv_flags |= FF_MPV_FLAG_STRICT_GOP; #endif switch (avctx->codec->id) { @@ -1300,7 +1302,7 @@ static int select_input_picture(MpegEncContext *s) } if (s->picture_in_gop_number + b_frames >= s->gop_size) { - if ((s->flags2 & CODEC_FLAG2_STRICT_GOP) && + if ((s->mpv_flags & FF_MPV_FLAG_STRICT_GOP) && s->gop_size > s->picture_in_gop_number) { b_frames = s->gop_size - s->picture_in_gop_number - 1; } else { |