[FFmpeg-cvslog] avformat/hlsenc: set EXT-X-TARGETDURATION use lrint(EXTINF)
Karthick J
git at videolan.org
Fri Dec 22 01:46:15 EET 2017
ffmpeg | branch: master | Karthick J <kjeyapal at akamai.com> | Fri Dec 22 07:43:54 2017 +0800| [93a0e478768e9bafc44b8956b94c27fe8e3486f3] | committer: Steven Liu
avformat/hlsenc: set EXT-X-TARGETDURATION use lrint(EXTINF)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93a0e478768e9bafc44b8956b94c27fe8e3486f3
---
libavformat/hlsenc.c | 2 +-
libavformat/hlsplaylist.h | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 29fc1d4122..0095ca4339 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1235,7 +1235,7 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs)
for (en = vs->segments; en; en = en->next) {
if (target_duration <= en->duration)
- target_duration = hls_get_int_from_double(en->duration);
+ target_duration = lrint(en->duration);
}
vs->discontinuity_set = 0;
diff --git a/libavformat/hlsplaylist.h b/libavformat/hlsplaylist.h
index 48d71b7c77..fe19f34368 100644
--- a/libavformat/hlsplaylist.h
+++ b/libavformat/hlsplaylist.h
@@ -36,11 +36,6 @@ typedef enum {
PLAYLIST_TYPE_NB,
} PlaylistType;
-static inline int hls_get_int_from_double(double val)
-{
- return (int)((val - (int)val) >= 0.001) ? (int)(val + 1) : (int)val;
-}
-
void ff_hls_write_playlist_version(AVIOContext *out, int version);
void ff_hls_write_stream_info(AVStream *st, AVIOContext *out,
int bandwidth, char *filename);
More information about the ffmpeg-cvslog
mailing list