From patchwork Wed Jul 10 08:34:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 13888 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 B2E7D446520 for ; Wed, 10 Jul 2019 11:34:34 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8526C68AB62; Wed, 10 Jul 2019 11:34:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbgbr2.qq.com (smtpbgbr2.qq.com [54.207.22.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 351B568AB25 for ; Wed, 10 Jul 2019 11:34:25 +0300 (EEST) X-QQ-mid: bizesmtp21t1562747649tsbx8ibl Received: from localhost (unknown [43.247.177.226]) by esmtp6.qq.com (ESMTP) with id ; Wed, 10 Jul 2019 16:34:07 +0800 (CST) X-QQ-SSF: 01100000002000K0ZPF1000A0000000 X-QQ-FEAT: s8YYpWqVDddDxgrarHxy+8UX0D8K8yxNc3tVb5Renfkg4mYtXFLqldcE6Ei7P gE5zWrUvxHKMVHWLEqHlwJmEHMPGTyWhD+jhPLDx4ckAdXEfYnpe0Glg7dy2UrEJMYObLJp BQmWIFmEOndjUk8ima+25ot16f438nZc/RH4zFtNOjubtc7SQ2rqrBmQuVTG/mgqfzMoNQr 3MAGPsdDiqfq/5gIl0nABh1xlmnQKl8Lq3rrOYOFGlcfqWgCcRek6tDOqO/ht8D9vQ5fYgx P/II269MNbIBaaRXi2J8npVm22og4k9Y2uDvTJ0OMtanL6zDJp205MWGLAQn4YGgApUlMMi 2F3p75T X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 Jul 2019 16:34:04 +0800 Message-Id: <20190710083404.87957-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.17.2 (Apple Git-113) X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH] avformat/dashdec: set the parent of represenation 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" and get the current sequence number after refresh playlist Signed-off-by: Steven Liu --- libavformat/dashdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 9364718c15..aa9f1726c9 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1065,6 +1065,7 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, av_log(s, AV_LOG_VERBOSE, "Ignoring invalid frame rate '%s'\n", rep_framerate_val); } + rep->parent = s; switch (type) { case AVMEDIA_TYPE_VIDEO: rep->rep_idx = video_rep_idx; @@ -1614,6 +1615,7 @@ static struct fragment *get_current_fragment(struct representation *pls) return seg; } else if (c->is_live) { refresh_manifest(pls->parent); + pls->cur_seq_no = calc_cur_seg_no(pls->parent, pls); } else { break; }