[FFmpeg-devel] [PATCH] lavf/webm_dash: Allow filenames without directories
Vignesh Venkatasubramanian
vigneshv at google.com
Thu Oct 9 23:56:47 CEST 2014
Fix basename computation code to allow just file names without any
directories in the path.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
---
libavformat/matroskadec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 105e1f4..b742319 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);
--
2.1.0.rc2.206.gedb03e5
More information about the ffmpeg-devel
mailing list