[FFmpeg-devel] [PATCH 1/2] aformat/hlsenc: fix typo of AV_TIME_BASE

Steven Liu lq at chinaffmpeg.org
Mon Jan 23 11:04:03 EET 2017


the code use 1000000 * duration, use AV_TIME_BASE replace 1000000

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 libavformat/hlsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 85d3955..f070bc3 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -501,7 +501,7 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double
                 return AVERROR(ENOMEM);
             }
             if (replace_int_data_in_filename(hls->avf->filename, sizeof(hls->avf->filename),
-                filename, 't',  (int64_t)round(1000000 * duration)) < 1) {
+                filename, 't',  (int64_t)round(AV_TIME_BASE * duration)) < 1) {
                 av_log(hls, AV_LOG_ERROR,
                        "Invalid second level segment filename template '%s', "
                         "you can try to remove second_level_segment_time flag\n",
-- 
2.10.1 (Apple Git-78)





More information about the ffmpeg-devel mailing list