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

Submitted by hwren on Oct. 2, 2018, 1:42 p.m.

Details

Message ID 1538487779-3283-2-git-send-email-hwrenx@126.com
State New
Headers show

Commit Message

hwren Oct. 2, 2018, 1:42 p.m.
Signed-off-by: hwren <hwrenx@126.com>
---
 libavcodec/libxavs2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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;