mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
lavf/dashenc: Delete HLS manifests on trailer writing if remove_at_exit is set.
This fixes HLS manifests being left behind if remove_at_exit is set.
This commit is contained in:
parent
2a5cf8a241
commit
84c17449ce
@ -1619,6 +1619,18 @@ static int dash_write_trailer(AVFormatContext *s)
|
||||
dashenc_delete_file(s, filename);
|
||||
}
|
||||
dashenc_delete_file(s, s->url);
|
||||
|
||||
if (c->hls_playlist && c->master_playlist_created) {
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
OutputStream *os = &c->streams[i];
|
||||
if (os->segment_type == SEGMENT_TYPE_MP4) {
|
||||
get_hls_playlist_name(filename, sizeof(filename), c->dirname, i);
|
||||
dashenc_delete_file(s, filename);
|
||||
}
|
||||
}
|
||||
snprintf(filename, sizeof(filename), "%smaster.m3u8", c->dirname);
|
||||
dashenc_delete_file(s, filename);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user