]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hlsenc.c
exr: fix out-of-bounds read
[ffmpeg] / libavformat / hlsenc.c
index e0bb44b3646d9091e1bd77bb3ab9866f2cc73a93..e16fb0caa9cb881664ea8b97f48c1eb7d5dd186b 100644 (file)
@@ -183,6 +183,7 @@ static int hls_delete_old_segments(HLSContext *hls) {
     segment = hls->old_segments;
     while (segment) {
         playlist_duration -= segment->duration;
+        hls->initial_prog_date_time += segment->duration;
         previous_segment = segment;
         segment = previous_segment->next;
         if (playlist_duration <= -previous_segment->duration) {
@@ -516,7 +517,7 @@ static int hls_window(AVFormatContext *s, int last)
     }
 
     if (!use_rename && !warned_non_file++)
-        av_log(s, AV_LOG_ERROR, "Cannot use rename on non file protocol, this may lead to races and temporarly partial files\n");
+        av_log(s, AV_LOG_ERROR, "Cannot use rename on non file protocol, this may lead to races and temporary partial files\n");
 
     set_http_options(&options, hls);
     snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" : "%s", s->filename);
@@ -686,7 +687,7 @@ static int hls_start(AVFormatContext *s)
         } else if (av_get_frame_filename2(oc->filename, sizeof(oc->filename),
                                   c->basename, c->wrap ? c->sequence % c->wrap : c->sequence,
                                   AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
-            av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s' you can try use -use_localtime 1 with it\n", c->basename);
+            av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s' you can try to use -use_localtime 1 with it\n", c->basename);
             return AVERROR(EINVAL);
         }
         if( c->vtt_basename) {