You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/hlsenc: refine the code readable for time unit
Reviewed-by: Bodecs Bela <bodecsb@vivanet.hu> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
@@ -47,6 +47,7 @@ typedef enum {
|
|||||||
|
|
||||||
#define KEYSIZE 16
|
#define KEYSIZE 16
|
||||||
#define LINE_BUFFER_SIZE 1024
|
#define LINE_BUFFER_SIZE 1024
|
||||||
|
#define HLS_MICROSECOND_UNIT 1000000
|
||||||
|
|
||||||
typedef struct HLSSegment {
|
typedef struct HLSSegment {
|
||||||
char filename[1024];
|
char filename[1024];
|
||||||
@@ -501,7 +502,7 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
if (replace_int_data_in_filename(hls->avf->filename, sizeof(hls->avf->filename),
|
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(duration * HLS_MICROSECOND_UNIT)) < 1) {
|
||||||
av_log(hls, AV_LOG_ERROR,
|
av_log(hls, AV_LOG_ERROR,
|
||||||
"Invalid second level segment filename template '%s', "
|
"Invalid second level segment filename template '%s', "
|
||||||
"you can try to remove second_level_segment_time flag\n",
|
"you can try to remove second_level_segment_time flag\n",
|
||||||
|
Reference in New Issue
Block a user