[FFmpeg-cvslog] lavf/webm_dash: Allow filenames without directories

Vignesh Venkatasubramanian git at videolan.org
Fri Oct 10 01:11:53 CEST 2014


ffmpeg | branch: master | Vignesh Venkatasubramanian <vigneshv at google.com> | Thu Oct  9 14:56:47 2014 -0700| [233f3ad8698383255fb8766e99647e87a88044fe] | committer: Michael Niedermayer

lavf/webm_dash: Allow filenames without directories

Fix basename computation code to allow just file names without any
directories in the path.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=233f3ad8698383255fb8766e99647e87a88044fe
---

 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);



More information about the ffmpeg-cvslog mailing list