Commit 189665d9 authored by Anton Khirnov's avatar Anton Khirnov Committed by Michael Niedermayer

id3v2: convert metadata after all the tags were read

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
(cherry picked from commit f7fcd6a2)
parent b3158f7a
...@@ -231,7 +231,6 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t ...@@ -231,7 +231,6 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
/* Skip to end of tag */ /* Skip to end of tag */
url_fseek(s->pb, next, SEEK_SET); url_fseek(s->pb, next, SEEK_SET);
} }
ff_metadata_conv(&s->metadata, NULL, ff_id3v2_metadata_conv);
if (len > 0) { if (len > 0) {
/* Skip padding */ /* Skip padding */
...@@ -261,7 +260,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic) ...@@ -261,7 +260,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic)
off = url_ftell(s->pb); off = url_ftell(s->pb);
ret = get_buffer(s->pb, buf, ID3v2_HEADER_SIZE); ret = get_buffer(s->pb, buf, ID3v2_HEADER_SIZE);
if (ret != ID3v2_HEADER_SIZE) if (ret != ID3v2_HEADER_SIZE)
return; break;
found_header = ff_id3v2_match(buf, magic); found_header = ff_id3v2_match(buf, magic);
if (found_header) { if (found_header) {
/* parse ID3v2 header */ /* parse ID3v2 header */
...@@ -274,6 +273,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic) ...@@ -274,6 +273,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic)
url_fseek(s->pb, off, SEEK_SET); url_fseek(s->pb, off, SEEK_SET);
} }
} while (found_header); } while (found_header);
ff_metadata_conv(&s->metadata, NULL, ff_id3v2_metadata_conv);
} }
const AVMetadataConv ff_id3v2_metadata_conv[] = { const AVMetadataConv ff_id3v2_metadata_conv[] = {
......
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