aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mp3.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-09-15 23:40:10 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-09-15 23:40:10 +0000
commitea25c063c303160e92b2566057614bd6863c48ea (patch)
tree2fd49e2566264b6be63783063d59d4ceebdf6a82 /libavformat/mp3.c
parentd891cbb444f232785e5854e7c8b5496385a0e916 (diff)
downloadffmpeg-ea25c063c303160e92b2566057614bd6863c48ea.tar.gz
10l: set genre default immediately before reading genre tag
Originally committed as revision 19867 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mp3.c')
-rw-r--r--libavformat/mp3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index 2d24d52992..b8b83b4b25 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -193,12 +193,12 @@ static int id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
count += id3v1_set_string(s, "album", buf + 63, 30);
count += id3v1_set_string(s, "year", buf + 93, 4);
count += id3v1_set_string(s, "comment", buf + 97, 30);
- buf[127] = 0xFF; /* default to unknown genre */
if ((tag = av_metadata_get(s->metadata, "track", NULL, 0))) {
buf[125] = 0;
buf[126] = atoi(tag->value);
count++;
}
+ buf[127] = 0xFF; /* default to unknown genre */
if ((tag = av_metadata_get(s->metadata, "genre", NULL, 0))) {
for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
if (!strcasecmp(tag->value, ff_id3v1_genre_str[i])) {