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/omadec.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat/omadec.c') diff --git a/libavformat/omadec.c b/libavformat/omadec.c index fa53636f1a..423d52b3aa 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -397,6 +397,11 @@ static int oma_read_header(AVFormatContext *s) OMAContext *oc = s->priv_data; ff_id3v2_read(s, ID3v2_EA3_MAGIC, &extra_meta, 0); + if ((ret = ff_id3v2_parse_chapters(s, &extra_meta)) < 0) { + ff_id3v2_free_extra_meta(&extra_meta); + return ret; + } + ret = avio_read(s->pb, buf, EA3_HEADER_SIZE); if (ret < EA3_HEADER_SIZE) return -1; -- cgit v1.2.3