[http] Prevent adding empty artwork urls into icy metadata

Some radio streams send empty strings as "StreamUrl", prevent these from
beeing added into the queue database.
This commit is contained in:
chme 2018-11-30 06:39:22 +01:00
parent 041a87427c
commit 234ccc2899

View File

@ -639,7 +639,7 @@ metadata_packet_get(struct http_icy_metadata *metadata, AVFormatContext *fmtctx)
else
metadata->title = strdup(metadata->title);
}
else if ((strncmp(icy_token, "StreamUrl", strlen("StreamUrl")) == 0) && !metadata->artwork_url)
else if ((strncmp(icy_token, "StreamUrl", strlen("StreamUrl")) == 0) && !metadata->artwork_url && strlen(ptr) > 0)
{
metadata->artwork_url = strdup(ptr);
}