Commit da0e7fe1 authored by aurel's avatar aurel

handle id3v2 'genre' tag formated as '%d'

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18145 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 475f8a9c
...@@ -198,7 +198,8 @@ static void id3v2_read_ttag(AVFormatContext *s, int taglen, const char *key) ...@@ -198,7 +198,8 @@ static void id3v2_read_ttag(AVFormatContext *s, int taglen, const char *key)
} }
if (!strcmp(key, "genre") if (!strcmp(key, "genre")
&& sscanf(dst, "(%d)", &genre) == 1 && genre <= ID3v1_GENRE_MAX) && (sscanf(dst, "(%d)", &genre) == 1 || sscanf(dst, "%d", &genre) == 1)
&& genre <= ID3v1_GENRE_MAX)
av_strlcpy(dst, id3v1_genre_str[genre], sizeof(dst)); av_strlcpy(dst, id3v1_genre_str[genre], sizeof(dst));
if (*dst) if (*dst)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment