From patchwork Wed Jul 22 09:15:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 21221 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 CE6A544A06F for ; Wed, 22 Jul 2020 12:15:46 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A4A7668B73A; Wed, 22 Jul 2020 12:15:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpproxy21.qq.com (smtpbg704.qq.com [203.205.195.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A869968B605 for ; Wed, 22 Jul 2020 12:15:38 +0300 (EEST) X-QQ-mid: bizesmtp19t1595409332t8bfknu5 Received: from localhost (unknown [103.107.216.230]) by esmtp10.qq.com (ESMTP) with id ; Wed, 22 Jul 2020 17:15:31 +0800 (CST) X-QQ-SSF: 01100000002000Z0ZXF0000A0000000 X-QQ-FEAT: 4LTZo2uvvHvcsJCOwgkYG8T/6jOn/L3yqUea9iHSbmGH8pFJUD0hIplKdFLLs 1W6sKh00mpdd2PySxGVxxurgpgUx7LMuQARBULRd3KaOu5EUaN4pxyso5f1dWZc0Ofqiqe9 STg6rsbyx1rfW5iOP85B8dKJWgUl7baq2lZgf2Bw9rInxtv3K2uuqFlGZOgof5TE9MAK256 Z6skDiHmvqe/78yhCP2gWG+34Wv9KsLWW5W0nf38hLDeBlupQhubOxneIrxxQ/TPF3JBlME 7vZps5xf08i2RgTBwze75lvH0l8yHGPkpi88l1whjKysH/j6BKwHUtnDAoIiRxyZU4QD5yb 2tpa+Z9 X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Wed, 22 Jul 2020 17:15:28 +0800 Message-Id: <20200722091529.71809-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:qybgforeign7 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH v2 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);