From patchwork Tue Jan 12 13:20:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Liu X-Patchwork-Id: 24918 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 696B2448EE0 for ; Tue, 12 Jan 2021 15:20:52 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 521D768AC4D; Tue, 12 Jan 2021 15:20:52 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7868968A9BB for ; Tue, 12 Jan 2021 15:20:44 +0200 (EET) X-QQ-mid: bizesmtp20t1610457627tvgoua05 Received: from localhost (unknown [103.107.216.233]) by esmtp6.qq.com (ESMTP) with id ; Tue, 12 Jan 2021 21:20:26 +0800 (CST) X-QQ-SSF: 01100000002000Z0Z000B00A0020000 X-QQ-FEAT: HtUBBCnXkj7td+zkzWfpiZuWEN9lNYqSnt4Gs23CfKQ4aD3DviI3M3GtbwD3v rIS6N303iYaV2iC5tuyLvCSS+tS1+EZBU7wJpLv+QQFeC3XX7hbGxRtD/G1R5HL+Us0IRKM Ppcha2pDFOplL8eK3o0ZZlN0ty4l26Fim6CrBq+ambvHshLveCKXEs11K20D1ksE0m3DQgd m0WAIQ/XnngCADoaW5xgUhdMqqKi72W2IXxNRqH3ic3RVszZrkAzNa7cHteeZGxI7nkGp4P SN3r5pmdlvD8RNqdAEuaCjSkKdkrwCnqNNeq5r/Ld5/UyO X-QQ-GoodBg: 0 X-QQ-CSender: lq@chinaffmpeg.org From: liuqi05 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Jan 2021 21:20:04 +0800 Message-Id: <20210112132004.23534-3-liuqi05@kuaishou.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210112132004.23534-1-liuqi05@kuaishou.com> References: <20210112132004.23534-1-liuqi05@kuaishou.com> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH 3/3] avformat/dashdec: rename variable name for more readable 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: liuqi05 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Rename is_init_section_common_audio to is_init_section_common_subtitle for is_common_init_section_exist(c->subtitles, c->n_subtitles). Because it is checked to subtitles, not audio. Signed-off-by: liuqi05 --- libavformat/dashdec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 85b5f147e8..e0a89ebc07 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -155,6 +155,7 @@ typedef struct DASHContext { /* Flags for init section*/ int is_init_section_common_video; int is_init_section_common_audio; + int is_init_section_common_subtitle; } DASHContext; @@ -2084,11 +2085,11 @@ static int dash_read_header(AVFormatContext *s) } if (c->n_subtitles) - c->is_init_section_common_audio = is_common_init_section_exist(c->subtitles, c->n_subtitles); + c->is_init_section_common_subtitle = is_common_init_section_exist(c->subtitles, c->n_subtitles); for (i = 0; i < c->n_subtitles; i++) { rep = c->subtitles[i]; - if (i > 0 && c->is_init_section_common_audio) { + if (i > 0 && c->is_init_section_common_subtitle) { ret = copy_init_section(rep, c->subtitles[0]); if (ret < 0) goto fail;