summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorJindrich Makovicka <jindrich.makovicka@nangu.tv>2011-05-10 15:11:45 +0200
committerAnton Khirnov <anton@khirnov.net>2011-05-17 23:01:42 +0200
commite25c67108a77b2dbf13de1339b5314d07e3ffa02 (patch)
tree916561eb1a041ab148cb2d3b616acbb471cffa59 /libavcodec/libx264.c
parent29e3489602aeb72dbd8ceebfcfa7025e8a57acaf (diff)
libx264: handle closed GOP codec flag
Also update libx264 presets to keep closed gop as default. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index bf5cbc501f..e5fac00469 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -298,6 +298,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
+ x4->params.b_open_gop = !(avctx->flags & CODEC_FLAG_CLOSED_GOP);
+
x4->params.i_slice_count = avctx->slices;
x4->params.vui.b_fullrange = avctx->pix_fmt == PIX_FMT_YUVJ420P;