summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.h
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2014-04-18 14:49:40 +1000
committerMichael Niedermayer <michaelni@gmx.at>2014-04-19 04:25:01 +0200
commit5331773cc33ba26b9e26ace643d926219e46a17b (patch)
tree9b66a00bf0b540d8bfd5b69ab5b36ddf220579f4 /libavformat/id3v2.h
parentc94305ae23318c8956a30485cd5642829f4f16a9 (diff)
ff_id3v2_read: add option to limit ID3 magic number search
Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 ' chunk tag. If such chunks are stored sequentially, it is possible for the ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g. [1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] [2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] Fixes ticket #3530. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/id3v2.h')
-rw-r--r--libavformat/id3v2.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h
index eb4dc799e6..9d7bf1c03c 100644
--- a/libavformat/id3v2.h
+++ b/libavformat/id3v2.h
@@ -112,8 +112,10 @@ void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, const char *ma
*
* @param extra_meta If not NULL, extra metadata is parsed into a list of
* ID3v2ExtraMeta structs and *extra_meta points to the head of the list
+ * @param[opt] max_search_search restrict ID3 magic number search (bytes from start)
*/
-void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta);
+void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta,
+ unsigned int max_search_size);
/**
* Initialize an ID3v2 tag.