From patchwork Tue Sep 10 15:25:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 15004 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 8A52644A34E for ; Tue, 10 Sep 2019 18:25:56 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 65E316880C5; Tue, 10 Sep 2019 18:25:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D9686880C5 for ; Tue, 10 Sep 2019 18:25:50 +0300 (EEST) Received: by mail-pl1-f194.google.com with SMTP id f19so8762208plr.3 for ; Tue, 10 Sep 2019 08:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xFhGrbD63LG/HJJ7/aREJlHhAdlr1owLEGrpn0TZCDc=; b=MwuoPD6wHMwpqwC7m8SiA4mQJvhA2YXDMvPczaQvXy1d1YkRa5CTknomF20sn3NO/8 21AJCJ5d/1l/4PYHre5f0VCRKfyFkZ/ZO6BknqUHcIM7OO5b4QZt3ozmBuQ0W4Y45+1B PSHV/K9HJSwOOruEfNVAkBmObRp8xVGX4pZGADVv7vjRyZUjBOeKt5R0zgOUdbeJELU/ ox535lXS2UciwanjDEMZVt1wWQ6htYML+8JSZYDLpJR9dh1p2OTAipmbTCfR6OZBM29L oWvGd8rOlwxaIuxvjjmbwfu2icyVmqOZ6DHTUwzcDk1yAirwzL4ZmhSy1g3bpeDlopKY cDDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xFhGrbD63LG/HJJ7/aREJlHhAdlr1owLEGrpn0TZCDc=; b=RV1Cegu8MPR7Fs3GPtmo0loxqZmReLou9lDHx/oE5sbRR3weAk9kBFSAQ8wCZlJE5n 9j9kVpHUsyL8mNV33wxlw7IovsUTM5zZTRv023Y5s20velKPQhslWrqO+1pCCbX5G91K 0IDdTK83CuAbVPNOdhaoFQE8fxBXmNODzHdA4kDHgogIoiq+caMdWjiTccUNJKAO6mEY zJZ15lnopfDOIC1NmbwTnNFFkJnKg6VO0y2GMsLkxXWUBGxW/knhpJACv3i/lo0rtYIe 1PF8kc5NNaPPe8i6wd987GQQik4AxQXTGkmvZI8Un0rLhsvszYMrmEUeO6LrT2ooAWAb JgWQ== X-Gm-Message-State: APjAAAX3GUd62QDOTNvXq3pg2Z4tzyANTzO6Cq+rxfsdNIjqbKdpfXiT NDrTkmFJzyYC/oGIBbOjYVOeXRg0 X-Google-Smtp-Source: APXvYqxnkIelunoNWFS/AJJso6uqrjZnsXUG0Q4Iu2eOT/cuN1f0xj2B18/6ZLIk8KnWBI0df/W1Zg== X-Received: by 2002:a17:902:9b83:: with SMTP id y3mr30260409plp.143.1568129148395; Tue, 10 Sep 2019 08:25:48 -0700 (PDT) Received: from vpn.localdomain ([47.90.99.151]) by smtp.gmail.com with ESMTPSA id t6sm17007273pgu.23.2019.09.10.08.25.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Sep 2019 08:25:47 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Sep 2019 23:25:43 +0800 Message-Id: <20190910152543.31403-1-lance.lmwang@gmail.com> X-Mailer: git-send-email 2.9.5 Subject: [FFmpeg-devel] [PATCH v1] avformat/dashdec: remove the unnecessary type conversion 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang Signed-off-by: Limin Wang --- libavformat/dashdec.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index a6f7551..4db61d8 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -694,11 +694,11 @@ static int parse_manifest_segmenttimeline(AVFormatContext *s, struct representat } if (!av_strcasecmp(attr->name, (const char *)"t")) { - tml->starttime = (int64_t)strtoll(val, NULL, 10); + tml->starttime = strtoll(val, NULL, 10); } else if (!av_strcasecmp(attr->name, (const char *)"r")) { - tml->repeat =(int64_t) strtoll(val, NULL, 10); + tml->repeat = strtoll(val, NULL, 10); } else if (!av_strcasecmp(attr->name, (const char *)"d")) { - tml->duration = (int64_t)strtoll(val, NULL, 10); + tml->duration = strtoll(val, NULL, 10); } attr = attr->next; xmlFree(val); @@ -943,22 +943,22 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, } if (presentation_timeoffset_val) { - rep->presentation_timeoffset = (int64_t) strtoll(presentation_timeoffset_val, NULL, 10); + rep->presentation_timeoffset = strtoll(presentation_timeoffset_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->presentation_timeoffset = [%"PRId64"]\n", rep->presentation_timeoffset); xmlFree(presentation_timeoffset_val); } if (duration_val) { - rep->fragment_duration = (int64_t) strtoll(duration_val, NULL, 10); + rep->fragment_duration = strtoll(duration_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->fragment_duration = [%"PRId64"]\n", rep->fragment_duration); xmlFree(duration_val); } if (timescale_val) { - rep->fragment_timescale = (int64_t) strtoll(timescale_val, NULL, 10); + rep->fragment_timescale = strtoll(timescale_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->fragment_timescale = [%"PRId64"]\n", rep->fragment_timescale); xmlFree(timescale_val); } if (startnumber_val) { - rep->first_seq_no = (int64_t) strtoll(startnumber_val, NULL, 10); + rep->first_seq_no = strtoll(startnumber_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->first_seq_no = [%"PRId64"]\n", rep->first_seq_no); xmlFree(startnumber_val); } @@ -968,7 +968,7 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, if (!val) { av_log(s, AV_LOG_ERROR, "Missing value attribute in adaptionset_supplementalproperty_node\n"); } else { - rep->last_seq_no =(int64_t) strtoll(val, NULL, 10) - 1; + rep->last_seq_no = strtoll(val, NULL, 10) - 1; xmlFree(val); } } @@ -1017,12 +1017,12 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, duration_val = get_val_from_nodes_tab(segmentlists_tab, 3, "duration"); timescale_val = get_val_from_nodes_tab(segmentlists_tab, 3, "timescale"); if (duration_val) { - rep->fragment_duration = (int64_t) strtoll(duration_val, NULL, 10); + rep->fragment_duration = strtoll(duration_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->fragment_duration = [%"PRId64"]\n", rep->fragment_duration); xmlFree(duration_val); } if (timescale_val) { - rep->fragment_timescale = (int64_t) strtoll(timescale_val, NULL, 10); + rep->fragment_timescale = strtoll(timescale_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->fragment_timescale = [%"PRId64"]\n", rep->fragment_timescale); xmlFree(timescale_val); }