avformat/hlsenc: EXT-X-I-FRAMES-ONLY requires version 4 or higher
authorZhao Zhili <quinkblack@foxmail.com>
Fri, 15 Jan 2021 16:47:41 +0000 (00:47 +0800)
committerliuqi05 <liuqi05@kuaishou.com>
Sun, 24 Jan 2021 02:55:44 +0000 (10:55 +0800)
libavformat/hlsenc.c

index 7f38db7..4b66f43 100644 (file)
@@ -1564,6 +1564,10 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs)
         sequence = 0;
     }
 
+    if (hls->flags & HLS_I_FRAMES_ONLY) {
+        hls->version = 4;
+    }
+
     if (hls->flags & HLS_INDEPENDENT_SEGMENTS) {
         hls->version = 6;
     }