diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-10-09 14:56:47 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-10 00:46:37 +0200 |
commit | 233f3ad8698383255fb8766e99647e87a88044fe (patch) | |
tree | 443e6dbebf827ad8861f2a897f4b514089fd1b4a | |
parent | ce928d7d2b3bd68a222cfbc19a44805ac4cdaf14 (diff) | |
download | ffmpeg-233f3ad8698383255fb8766e99647e87a88044fe.tar.gz |
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@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskadec.c | 3 |
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); |