You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/hlsenc: donnot show duplicate segment warning at byterange mode
When the hlsenc at BYTERANGE mode, it should not show the warning message: "Duplicated segment filename detected:" Reported-by: Marco <marco@worldcast.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
@@ -722,6 +722,7 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double
|
|||||||
{
|
{
|
||||||
HLSSegment *en = av_malloc(sizeof(*en));
|
HLSSegment *en = av_malloc(sizeof(*en));
|
||||||
const char *filename;
|
const char *filename;
|
||||||
|
int byterange_mode = (hls->flags & HLS_SINGLE_FILE) || (hls->max_seg_size > 0);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!en)
|
if (!en)
|
||||||
@@ -737,8 +738,8 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double
|
|||||||
if (hls->use_localtime_mkdir) {
|
if (hls->use_localtime_mkdir) {
|
||||||
filename = hls->avf->filename;
|
filename = hls->avf->filename;
|
||||||
}
|
}
|
||||||
if (find_segment_by_filename(hls->segments, filename)
|
if ((find_segment_by_filename(hls->segments, filename) || find_segment_by_filename(hls->old_segments, filename))
|
||||||
|| find_segment_by_filename(hls->old_segments, filename)) {
|
&& !byterange_mode) {
|
||||||
av_log(hls, AV_LOG_WARNING, "Duplicated segment filename detected: %s\n", filename);
|
av_log(hls, AV_LOG_WARNING, "Duplicated segment filename detected: %s\n", filename);
|
||||||
}
|
}
|
||||||
av_strlcpy(en->filename, filename, sizeof(en->filename));
|
av_strlcpy(en->filename, filename, sizeof(en->filename));
|
||||||
|
Reference in New Issue
Block a user