[FFmpeg-devel] [PATCH v1] avformat/dashdec: remove the unnecessary type conversion
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Tue Sep 10 18:25:43 EEST 2019
From: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
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);
}
--
2.6.4
More information about the ffmpeg-devel
mailing list