From 1fd80106be3dca9fa0ea13fb364c8d221bd27c15 Mon Sep 17 00:00:00 2001 From: Lukas Stabe Date: Thu, 5 Oct 2017 03:34:19 +0200 Subject: avformat: fix id3 chapters These changes store id3 chapter data in ID3v2ExtraMeta and introduce ff_id3v2_parse_chapters to parse them into the format context if needed. Encoders using ff_id3v2_read, which previously parsed chapters into the format context automatically, were adjusted to call ff_id3v2_parse_chapters. Signed-off-by: wm4 --- libavformat/asfdec_f.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavformat/asfdec_f.c') diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index cc648b9a2f..64a0b9d7f2 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -307,8 +307,10 @@ static void get_id3_tag(AVFormatContext *s, int len) ID3v2ExtraMeta *id3v2_extra_meta = NULL; ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, len); - if (id3v2_extra_meta) + if (id3v2_extra_meta) { ff_id3v2_parse_apic(s, &id3v2_extra_meta); + ff_id3v2_parse_chapters(s, &id3v2_extra_meta); + } ff_id3v2_free_extra_meta(&id3v2_extra_meta); } -- cgit v1.2.3