avformat/hlsenc: Use AV_FRAME_FILENAME_FLAGS_MULTIPLE, support tee:
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 3 Aug 2016 18:35:53 +0000 (20:35 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 4 Aug 2016 21:22:54 +0000 (23:22 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/hlsenc.c

index 5dc518d..9f076ba 100644 (file)
@@ -561,14 +561,16 @@ static int hls_start(AVFormatContext *s)
                 }
                 av_free(fn_copy);
             }
-        } else if (av_get_frame_filename(oc->filename, sizeof(oc->filename),
-                                  c->basename, c->wrap ? c->sequence % c->wrap : c->sequence) < 0) {
+        } 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);
             return AVERROR(EINVAL);
         }
         if( c->vtt_basename) {
-            if (av_get_frame_filename(vtt_oc->filename, sizeof(vtt_oc->filename),
-                              c->vtt_basename, c->wrap ? c->sequence % c->wrap : c->sequence) < 0) {
+            if (av_get_frame_filename2(vtt_oc->filename, sizeof(vtt_oc->filename),
+                              c->vtt_basename, c->wrap ? c->sequence % c->wrap : c->sequence,
+                              AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
                 av_log(vtt_oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", c->vtt_basename);
                 return AVERROR(EINVAL);
             }