concatdec: Do not pass NULL to memcmp

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2017-07-06 13:15:00 -04:00
parent f605b56ad9
commit 99c68861f9

View File

@ -120,7 +120,7 @@ static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile,
proto = avio_find_protocol_name(filename);
proto_len = proto ? strlen(proto) : 0;
if (!memcmp(filename, proto, proto_len) &&
if (proto && !memcmp(filename, proto, proto_len) &&
(filename[proto_len] == ':' || filename[proto_len] == ',')) {
url = filename;
filename = NULL;