From patchwork Wed Sep 20 03:03:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 5200 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.36.26 with SMTP id f26csp259633jaa; Tue, 19 Sep 2017 20:03:39 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCjKbgDnvJdUVJJFo/Y4eHNA64SCMhzBV9ztRDOfvu4JBy1NqPo5WqtuhJ4PG/f50Wwx2eS X-Received: by 10.28.105.92 with SMTP id e89mr2457111wmc.65.1505876619666; Tue, 19 Sep 2017 20:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505876619; cv=none; d=google.com; s=arc-20160816; b=xZP9zoiFP2qxAYSxdAEKGiehf7SvRXZOC8YuW+8OaG8hBDw64RbFUfXKn7EnxceWgX urw0D71QIC4hF3MK2TxDnS8W9AcD1Ktw0bUmZjIm5+EzX3z6EoKP2Wveqj9Vz0jvDn7m NFRZLFjyq18o9tAWiujb3zFEbU0gjOc0ju1t++A50DxFtUWhBVz1Y8ZR3uBkKeED6ixu MbztJ+81wekBmyiVmMDQptInOipp9LeJEFwvR5RQ5nx1ufFcQb6ufiSMcgFjVqhKM/K8 Aj9oPkTRmqBtSrt6prn7qE2OUR/naZObj0t/JNbp1KSOkw/DnsDpDfvelMDfYthu0yr+ HWlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:feedback-id:message-id:date:to:from :delivered-to:arc-authentication-results; bh=q4AxYryghU2m+Bnhk5ofulSl3xFsNG6T2sXspvj18Vo=; b=fh+g2wTMsR63Ab8uzVvdsy/WklEexsQ1VhqgwcXBuldvHnXL1I8g40uu+kMwqzFWRz zaoI3SLTnOBHhOjyZkGP2SxITNXfn5h4CwKG1zyCMBQvVbPEjYXRqCF7M7GhWGMs4nN9 DEMjKpn79uAcrbZDAEY9CPUc3YgXsBQWgC5z2d0687Onv9lO4raxjfva6E9EvPurUWCp 2P6fYT2uVrguMfURRo23w0Sq1So1UsmPMgMXX9tLLf4G22FOhpHV4RfIZL7Y5dkGtbwp 9CKY3yGI+HJcoxKgpiPMnKMJ0mPX/P5z2h7D8V/1ZdPcZb0zl9HUYGiKn/5RELBdPlNz n+Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2si533475wma.28.2017.09.19.20.03.38; Tue, 19 Sep 2017 20:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 17F626883E4; Wed, 20 Sep 2017 06:03:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB7B668830D for ; Wed, 20 Sep 2017 06:03:20 +0300 (EEST) X-QQ-mid: bizesmtp9t1505876588thiwnh3b4 Received: from localhost (unknown [47.90.47.25]) by esmtp4.qq.com (ESMTP) with id ; Wed, 20 Sep 2017 11:03:07 +0800 (CST) X-QQ-SSF: 01100000002000F0FH60B00A0000000 X-QQ-FEAT: JN+C/NT9bLMwlRKHaPfxDw+IuDtlR0vqSU75JrvKolLa3B44W3UJ64gkQbyxd o8TFZfWtAffXcMkvLljWGfgh5oWlDVIW3cuXYtPDPyV5aNweTh6yMhJy5p3SukoS5zpiCdy J/w0Z5MoLOypqQa94b5wW+qNftaGEKhYV2gQIVJMtjhRYsUxVZxstOHPnS/etNMnIxjpSZf FFfMObMNakmREUDkgCPlu6zuPpJj0lKHHO8PUmr8n54ANM8iPJJsJykNhxlHjUNNsOHWqBC B4KoEBNaoH6Q079MWf0tSnZ0Y= X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Sep 2017 11:03:00 +0800 Message-Id: <20170920030300.11321-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.10.1.382.ga23ca1b.dirty X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH] avformat/hls: support cache protocol in hls 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 , Steven Liu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" support play hls from cache 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 0995345bbf..889ae6c201 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -628,7 +628,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, url); return AVERROR_INVALIDDATA; } - } else if (av_strstart(proto_name, "http", NULL)) { + } else if (av_strstart(proto_name, "http", NULL) || av_strstart(proto_name, "cache", NULL)) { ; } else return AVERROR_INVALIDDATA;