summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 105e1f4b20..b742319b9a 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3326,8 +3326,7 @@ static int webm_dash_manifest_read_header(AVFormatContext *s)
// basename of the file
buf = strrchr(s->filename, '/');
- if (!buf) return -1;
- av_dict_set(&s->streams[0]->metadata, FILENAME, ++buf, 0);
+ av_dict_set(&s->streams[0]->metadata, FILENAME, buf ? ++buf : s->filename, 0);
// duration
buf = av_asprintf("%g", matroska->duration);