While the Matroska specification allows the filename string to be empty, forwarding an empty string as tag is useless.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavformat/matroskadec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index c224c3447a..0d15c634ee 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2881,7 +2881,10 @@ static int matroska_read_header(AVFormatContext *s) AVStream *st = avformat_new_stream(s, NULL); if (!st) break; - av_dict_set(&st->metadata, "filename", attachments[j].filename, 0); + + // Empty filenames are legal and accepted, but useless. + if (attachments[j].filename[0]) + av_dict_set(&st->metadata, "filename", attachments[j].filename, 0); av_dict_set(&st->metadata, "mimetype", attachments[j].mime, 0); st->codecpar->codec_id = AV_CODEC_ID_NONE; -- 2.20.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".