OSDN Git Service

avformat/id3v2: allow ID3 parsing without AVFormatContext
authorAnssi Hannula <anssi.hannula@iki.fi>
Mon, 30 Dec 2013 08:02:59 +0000 (10:02 +0200)
committerAnssi Hannula <anssi.hannula@iki.fi>
Tue, 31 Dec 2013 03:15:19 +0000 (05:15 +0200)
commit7fdf245ab9cb06b7195b8554e0b56f0835d1a142
treee91badc5330c75886bd492ecfce3b43bd665d1ea
parentd52882faef368264f9fe5a595274ec84d3446132
avformat/id3v2: allow ID3 parsing without AVFormatContext

Add ff_id3v2_read_dict() for parsing without AVFormatContext, but
instead with AVIOContext and AVDictionary.

AVFormatContext is still used for logging, if available.

Chapter parsing is the only non-logging functionality that actually
needs AVFormatContext, and AFAICS it should be modified to write the
data to ID3v2ExtraMeta first, from where it can be implanted to
AVFormatContext by a separate function (like it is done with
read_apic() and ff_id3v2_parse_apic()). That is outside the scope of
this patch, though.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
libavformat/id3v2.c
libavformat/id3v2.h