]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hls: support avio_seek in encryption mode
authorSteven Liu <lq@chinaffmpeg.org>
Wed, 22 Jul 2020 09:15:28 +0000 (17:15 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 10 Aug 2020 07:52:54 +0000 (15:52 +0800)
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
libavformat/hls.c

index cf0b71d65dccbbaf5ba941e51e348bffaf3862f6..84f0a5f3238b38bb209c19b3e116a4cf5bbe1ca2 100644 (file)
@@ -1291,7 +1291,7 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg,
      * as would be expected. Wrong offset received from the server will not be
      * noticed without the call, though.
      */
-    if (ret == 0 && !is_http && seg->key_type == KEY_NONE && seg->url_offset) {
+    if (ret == 0 && !is_http && seg->url_offset) {
         int64_t seekret = avio_seek(*in, seg->url_offset, SEEK_SET);
         if (seekret < 0) {
             av_log(pls->parent, AV_LOG_ERROR, "Unable to seek to offset %"PRId64" of HLS segment '%s'\n", seg->url_offset, seg->url);