[FFmpeg-devel] [PATCH v1 2/3] lavc/libxavs2: enable open_gop option

hwren hwrenx at 126.com
Tue Oct 2 16:42:58 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 a3cd588..cb01291 100644
--- a/libavcodec/libxavs2.c
+++ b/libavcodec/libxavs2.c
@@ -89,7 +89,7 @@ static av_cold int xavs2_init(AVCodecContext *avctx)
     xavs2_opt_set2("thread_frames",     "%d", avctx->thread_count);
     xavs2_opt_set2("thread_rows",       "%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