aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dsfdec.c
diff options
context:
space:
mode:
authorLukas Stabe <lukas@stabe.de>2017-10-05 03:34:19 +0200
committerwm4 <nfxjfg@googlemail.com>2017-10-05 17:10:23 +0200
commit1fd80106be3dca9fa0ea13fb364c8d221bd27c15 (patch)
treee820d55b354b49746bbf46f62860de7d20ed8d19 /libavformat/dsfdec.c
parentcafd9d66ed9e1bad4ae579a3935f7af57a567a51 (diff)
downloadffmpeg-1fd80106be3dca9fa0ea13fb364c8d221bd27c15.tar.gz
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 <nfxjfg@googlemail.com>
Diffstat (limited to 'libavformat/dsfdec.c')
-rw-r--r--libavformat/dsfdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c
index 49ca336427..41538fd83c 100644
--- a/libavformat/dsfdec.c
+++ b/libavformat/dsfdec.c
@@ -53,8 +53,10 @@ static void read_id3(AVFormatContext *s, uint64_t id3pos)
return;
ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, 0);
- 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);
}