diff options
author | Richard Shaffer <rshaffer@tunein.com> | 2018-01-23 09:39:53 -0800 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2018-01-24 04:01:01 +0100 |
commit | 8a4cc0a2567fa8418709f75af5539cdf76fefb99 (patch) | |
tree | 8b4f3db2013b830a884249f4aced89149eab48fc /libavformat/utils.c | |
parent | f0320afab977edc7b73317c8ef36ff1d60296401 (diff) | |
download | ffmpeg-8a4cc0a2567fa8418709f75af5539cdf76fefb99.tar.gz |
avformat: add option to parse/store ID3 PRIV tags in metadata.
Enables getting access to ID3 PRIV tags from the command-line or metadata API
when demuxing. The PRIV owner is stored as the metadata key prepended with
"id3v2_priv.", and the data is stored as the metadata value. As PRIV tags may
contain arbitrary data, non-printable characters, including NULL bytes, are
escaped as \xXX.
Similarly, any metadata tags that begin with "id3v2_priv." are inserted as ID3
PRIV tags into the output (assuming the format supports ID3). \xXX sequences in
the value are un-escaped to their byte value.
Signed-off-by: wm4 <nfxjfg@googlemail.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 3d733417e1..c15b8cc818 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -637,6 +637,8 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, goto fail; if ((ret = ff_id3v2_parse_chapters(s, &id3v2_extra_meta)) < 0) goto fail; + if ((ret = ff_id3v2_parse_priv(s, &id3v2_extra_meta)) < 0) + goto fail; } else av_log(s, AV_LOG_DEBUG, "demuxer does not support additional id3 data, skipping\n"); } |