concatdec: Do not pass NULL to memcmp

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
pull/264/head^2
Derek Buitenhuis 8 years ago
parent f605b56ad9
commit 99c68861f9
  1. 2
      libavformat/concatdec.c

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

Loading…
Cancel
Save