Fixup new libav 10 icy extraction

This commit is contained in:
ejurgensen 2014-06-02 21:51:50 +02:00
parent 6a8f93b7df
commit 844a9b43c9
2 changed files with 5 additions and 3 deletions

View File

@ -336,8 +336,11 @@ extract_metadata_icy(struct media_file_info *mfi, AVFormatContext *ctx)
while (icy_token != NULL)
{
ptr = strchr(icy_token, ':');
if (!ptr || (strlen(ptr) < 3))
if (!ptr || (strlen(ptr) < 4))
{
icy_token = strtok(NULL, "\r\n");
continue;
}
ptr++;
if (ptr[0] == ' ')

View File

@ -280,7 +280,6 @@ scan_metadata_icy(char *url, struct media_file_info *mfi)
/* Can't count on server support for ICY metadata, so
* while waiting for a reply make a parallel call to scan_metadata_ffmpeg.
* TODO ffmpeg 2/libav 10 has ICY/Shoutcast support
*/
no_icy:
ret = scan_metadata_ffmpeg(url, mfi);