changeset 4787:fbe515ed10fd libavformat

handle id3v2 'genre' tag formated as '%d'
author aurel
date Sun, 22 Mar 2009 16:10:37 +0000
parents d5ae967cc549
children 99c0c6d046d8
files mp3.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mp3.c	Sun Mar 22 13:05:13 2009 +0000
+++ b/mp3.c	Sun Mar 22 16:10:37 2009 +0000
@@ -198,7 +198,8 @@
     }
 
     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)