mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 18:10:13 +01:00
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>
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user