1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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>
This commit is contained in:
Vignesh Venkatasubramanian 2014-10-09 14:56:47 -07:00 committed by Michael Niedermayer
parent ce928d7d2b
commit 233f3ad869

View File

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