From patchwork Fri Jul 17 00:43:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6rmA64+Z7JuQ64uYKERvbmd3b24gS2ltKQ==?= X-Patchwork-Id: 21134 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 4240344B8FF for ; Fri, 17 Jul 2020 03:43:22 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1FDBC68B5C0; Fri, 17 Jul 2020 03:43:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from secumail1.sktelecom.com (secumail1.sktelecom.com [203.236.20.242]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6F416883AD for ; Fri, 17 Jul 2020 03:43:14 +0300 (EEST) Received: from unknown (HELO SKT-MAILPEDGE1.skt.ad) (203.236.20.107) by 203.236.20.242 with ESMTP; 17 Jul 2020 09:43:09 +0900 X-Original-SENDERIP: 203.236.20.107 X-Original-MAILFROM: dongwon.kim@sk.com Received: from SKT-MAILPALL2.SKT.AD (203.236.13.5) by owa.sktelecom.com (203.236.20.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 17 Jul 2020 09:43:07 +0900 Received: from SKT-MAILPALL1.SKT.AD (150.19.7.214) by SKT-MAILPALL2.SKT.AD (150.19.7.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Fri, 17 Jul 2020 09:43:07 +0900 Received: from SKT-MAILPEDGE2.skt.ad (203.236.20.108) by SKT-MAILPALL1.SKT.AD (150.19.7.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3 via Frontend Transport; Fri, 17 Jul 2020 09:43:07 +0900 Received: from KOR01-SL2-obe.outbound.protection.outlook.com (104.47.108.59) by owa.sktelecom.com (203.236.20.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Fri, 17 Jul 2020 09:43:06 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g5/alumoXZ4966FFI+qSwFsGlS9bxD1RytMap3m8lg8C+v5tn93BsTgZBkaAphexTKUBvqDsbwG7oxm7VP0bbTqBIBFuoiMP25URx5XbeUSkWhPg8AEyHuynvoKZKCW7rk17beMz1jYucq8CR4E/OOv9Pwbwhm5Lgo2j9aJNMDx4NXIKAAFUE+9uKPZPvzdOz26fzDkBGjCshqDlykbVWAZmtQD+rraaN9MB9IVSRfh4PMvwrIop1zgq43m4Ifsyf2+nETUhqrpikeuSBy4Q0c4X2hbuUDs2B00SOaCLOxztPUFij0OiCfhc2yqTyqNVy6Zr6MgGNomMoPnCO0K9Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GWcwl93LlOWsKUckMAPjp0y1EJKTuL4If1Hj0L+alzs=; b=bDwKzxQsThdQ+kojHvgiE4D9/UNPjv7tx2sMpMX7VNbXaESVwy3cvCRXvTyGL7BW9DQjjZelooAVMrXbwvGPkNm9EOSeWchjcGG2i00F+MQ/DHmy19pfM3pj3R3TS4nt98fR1Z2DvP2S2vRgBZXAq1F3aCFPM86pblib1icZSVe+lCDWuzU8QZoBIoGqFbVEM6Dr9MOvF9ZZ1A84/3cJyS5IMseTixmBdWYd2WDtqxXgkkQ8/+9Uhf+SIcji7Cpi1uloRwikK8mHkAd4nl0ncqrraoNZttkELjicC8QpYHEtPcnDApvvUuvGaafFrhmm4GcNUiAD8badA2WldJhiEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sktelecom.com; dmarc=pass action=none header.from=sktelecom.com; dkim=pass header.d=sktelecom.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o365skt.onmicrosoft.com; s=selector2-o365skt-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GWcwl93LlOWsKUckMAPjp0y1EJKTuL4If1Hj0L+alzs=; b=I2uzI7nrMxlfgsLVu46dIywTYCHuFe9m72KH+1XYBNRdtrUKbJEJHE86UkJou1EpaOdmsuuU2JVuxP1yR6qE2R2eKjpHY6uouv2U9dmokG4ONhUbZxk8QSBnksHwrQc1w+u/rZv4Sf52uOhQEHgryYU7uBtFLVG1ZMKGp6I2psY= Received: from SL2P216MB0377.KORP216.PROD.OUTLOOK.COM (2603:1096:100:22::23) by SL2P216MB0299.KORP216.PROD.OUTLOOK.COM (2603:1096:100:24::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Fri, 17 Jul 2020 00:43:05 +0000 Received: from SL2P216MB0377.KORP216.PROD.OUTLOOK.COM ([fe80::b876:d193:7efa:8a93]) by SL2P216MB0377.KORP216.PROD.OUTLOOK.COM ([fe80::b876:d193:7efa:8a93%6]) with mapi id 15.20.3174.026; Fri, 17 Jul 2020 00:43:05 +0000 From: =?ks_c_5601-1987?b?sei1v7/4tNQoRG9uZ3dvbiBLaW0p?= To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [PATCH] avformat/hls: add supporting EXT-X-DISCONTINUITY tag Thread-Index: AQHWW9MKizO4GRzulkyjqbTKlB2SAqkK7pDQ Date: Fri, 17 Jul 2020 00:43:05 +0000 Message-ID: References: <20200717003757.558664-1-dongwon.kim@sk.com> In-Reply-To: <20200717003757.558664-1-dongwon.kim@sk.com> Accept-Language: ko-KR, en-US Content-Language: ko-KR X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: ffmpeg.org; dkim=none (message not signed) header.d=none;ffmpeg.org; dmarc=none action=none header.from=sktelecom.com; x-originating-ip: [203.236.9.162] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 61ac5759-adaf-47a4-686f-08d829ea5e61 x-ms-traffictypediagnostic: SL2P216MB0299: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:346; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GJ1PHk0Vuu5X2Hl046HmwSdQVTB22kNtwF94zmT9PEFUKJbuA24TlV8n1dQ+nd+GlgZmM7gEe+TyMVBt1MoUegjm3vUVcXdnMMBFzjcrX7H8PO2HwZC1lb0IAY2QfONEIGo9INoyxjCIHrPywbA3EuRFm3Mec2YUdiRN4uWU+7+lXYooO9qdQdTHixSwPAd/eKUfXLviRMBoTkNRG0wkLk4ocUq7eFASApUdmH4+XzDoMeqXXg6egBHeVd7LjFXBeRqptK/Il/t/DZkUhaUACmadBds9IlfWdWF9Y7mSn3kK+VDMPqvoZTmFaMNc/mk7lupkRDlq/AjcJtKmJkUNVg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SL2P216MB0377.KORP216.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(346002)(366004)(376002)(136003)(396003)(39860400002)(64756008)(33656002)(66946007)(66446008)(66476007)(2906002)(86362001)(6506007)(6916009)(5660300002)(76116006)(85182001)(66556008)(7696005)(478600001)(9686003)(55016002)(8676002)(316002)(26005)(186003)(8936002)(52536014)(71200400001)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: /n0W4cuxsapbUKeOzw1XaasVBpSJlgxJltFE1YBB6v5FBNE7RffFuIq+Bj8de51uDbX94XIcsBDuT3wF8SZFlb8X+/6lBVO5OgWSc/TRgfs0AnXWvJHMxVPdAyjUGwaYOoJil3R+eWtRrjhy3ssJkBYpaYhnGcrJ8/AyLs5+Ho/Q1orqBzwfTX/Vhi9NHnO3z/DINP23VFuSbES9tq10nmhP642LLxEiFqfbPTDK88BbNbwnK+k7O3xZdi79FuaOf9qJ82auk148XrAhbyl16KaOV8GovJsBQchCn1JSittrqmPPuuXzAkjJy8gEKp7BhJ9e/WDg5Ca9EDOn2lzLRk0E/n5wLmR4QzYwDqPpE9zYgTu3q7vv7OrxZXVTe1NRlHAd2YLIAkft11/aQUlhc/vsr/S1FtbTMc5/XcHmAbbiSePT1h5pc1bl+fpuWfiwN1Ymwxrc2KlD7S5LuOydGPIGkWhS+rIg1k7g/cnuA/U= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SL2P216MB0377.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 61ac5759-adaf-47a4-686f-08d829ea5e61 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2020 00:43:05.4843 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5afa09fd-c4be-434d-830d-f4765c449035 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JyjzNWHq7KswVf3vRB/Pj3gj1qbmNrGkWwgR8UVDTkd9S3pLHK72c48Sa3sAcCLrRrhgtDpCspZicVB3yE5oAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2P216MB0299 X-OriginatorOrg: sktelecom.com Subject: [FFmpeg-devel] [PATCH] avformat/hls: add supporting EXT-X-DISCONTINUITY tag 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Dongwon Kim --- libavformat/hls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/libavformat/hls.c b/libavformat/hls.c index ba17c4ed96..5e331ab68f 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -810,6 +810,8 @@ static int parse_playlist(HLSContext *c, const char *url, ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_rendition_args, &info); new_rendition(c, &info, url); + } else if (av_strstart(line, "#EXT-X-DISCONTINUITY", &ptr)) { + c->ctx->iformat->flags |= AVFMT_TS_DISCONT; } else if (av_strstart(line, "#EXT-X-TARGETDURATION:", &ptr)) { ret = ensure_playlist(c, &pls, url); if (ret < 0) @@ -2406,7 +2408,7 @@ AVInputFormat ff_hls_demuxer = { .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"), .priv_class = &hls_class, .priv_data_size = sizeof(HLSContext), - .flags = AVFMT_NOGENSEARCH | AVFMT_TS_DISCONT, + .flags = AVFMT_NOGENSEARCH, .read_probe = hls_probe, .read_header = hls_read_header, .read_packet = hls_read_packet,