Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2009-03-22 19:10:37 +0300
committerAurelien Jacobs <aurel@gnuage.org>2009-03-22 19:10:37 +0300
commitbd51c0138af2221e4bb0514b78ca23822c62a90e (patch)
tree58c68061eb426f81c27d0148e25a277bdad58202 /libavformat
parent2121b160d5863e7e66a96df01a2c38708920dd67 (diff)
handle id3v2 'genre' tag formated as '%d'
Originally committed as revision 18145 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mp3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index fa383d6512..b032f0c09e 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -198,7 +198,8 @@ static void id3v2_read_ttag(AVFormatContext *s, int taglen, const char *key)
}
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));
if (*dst)