lavc/libxavs2: enable OpenGop
authorhwren <hwrenx@126.com>
Thu, 18 Oct 2018 15:02:10 +0000 (23:02 +0800)
committerJun Zhao <jun.zhao@intel.com>
Sun, 28 Oct 2018 06:20:29 +0000 (14:20 +0800)
Signed-off-by: hwren <hwrenx@126.com>
libavcodec/libxavs2.c

index f07fc63..822af3f 100644 (file)
@@ -91,7 +91,7 @@ static av_cold int xavs2_init(AVCodecContext *avctx)
     xavs2_opt_set2("ThreadFrames",      "%d", avctx->thread_count);
     xavs2_opt_set2("ThreadRows",        "%d", cae->lcu_row_threads);
 
-    xavs2_opt_set2("OpenGOP",  "%d", 1);
+    xavs2_opt_set2("OpenGOP",  "%d", !(avctx->flags & AV_CODEC_FLAG_CLOSED_GOP));
 
     if (cae->xavs2_opts) {
         AVDictionary *dict    = NULL;