From patchwork Wed Jul 22 08:11:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 21219 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id DBFA944A207 for ; Wed, 22 Jul 2020 11:11:28 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 91D6268B76A; Wed, 22 Jul 2020 11:11:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09F8D68B710 for ; Wed, 22 Jul 2020 11:11:20 +0300 (EEST) X-QQ-mid: bizesmtp21t1595405473tmguz1ob Received: from localhost (unknown [103.107.216.230]) by esmtp6.qq.com (ESMTP) with id ; Wed, 22 Jul 2020 16:11:13 +0800 (CST) X-QQ-SSF: 01100000002000Z0ZXF0B00A0000000 X-QQ-FEAT: DoD8xN2rKowj0bALzAY9vw3FXcUT2fiL0kjsj5jAttPiZCuT77m0Ak6c9upiV 9i7FAPpDOq+wh4GoC4I58RiJufy2bCGyASXiml7NU0lEXL3tMlqGVkAFeEfc0aC9njx1pQ1 iAlEgiXSPkcXaZLe0HsSGL+gmv2/Jxv5TXdz1acQmJJyNBdE3BVEqgBx+RpbJKk/THY0Phm 9GLVMPBuHtDEn46FAsKOZjOvlc+El8busZE6mgF6f9bXc5cAZCeSkskLe22JHFBBAjEYImt V14lM7mLZEQ+u10OBTB0RiqnYvrdd/AaPIgFt3u/FJEiRt X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Wed, 22 Jul 2020 16:11:02 +0800 Message-Id: <20200722081103.69962-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/hls: support avio_seek in encryption mode X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Steven Liu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Steven Liu --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index ba17c4ed96..5bc775cd8b 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -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);