]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/webmdashenc.c
avformat/hlsenc: add a use_localtime option to expand the segment filename with localtime
[ffmpeg] / libavformat / webmdashenc.c
index 76ea4237e2b4cc7c3d0f85a5fd4c04aaba0237ad..898e4641d372c55a3bd2586c84a9a2677ccb13df 100644 (file)
@@ -392,10 +392,10 @@ static int write_adaptation_set(AVFormatContext *s, int as_index)
         if (w->is_live) {
             AVDictionaryEntry *filename =
                 av_dict_get(s->streams[as->streams[i]]->metadata, FILENAME, NULL, 0);
-            if (!filename ||
-                (ret = parse_filename(filename->value, &representation_id, NULL, NULL))) {
+            if (!filename)
+                return AVERROR(EINVAL);
+            if (ret = parse_filename(filename->value, &representation_id, NULL, NULL))
                 return ret;
-            }
         } else {
             representation_id = av_asprintf("%d", w->representation_id++);
             if (!representation_id) return AVERROR(ENOMEM);