[FFmpeg-devel] [PATCH v2 3/3] lavc/libxavs2: enable OpenGop

hwren hwrenx at 126.com
Thu Oct 18 18:02:10 EEST 2018


Signed-off-by: hwren <hwrenx at 126.com>
---
 libavcodec/libxavs2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c
index f07fc63..822af3f 100644
--- a/libavcodec/libxavs2.c
+++ b/libavcodec/libxavs2.c
@@ -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;
-- 
2.7.4



More information about the ffmpeg-devel mailing list