summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-03 21:16:31 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-03 21:16:31 +0100
commit0dd53e14f9684a787d6c66d3cb44afb0a6bb2b7b (patch)
tree8cabd5eee3f865caaa4d1f259ea19fe8e2a16139
parentb7d3fbc69bb60ab2c1369ac5ba20f23565a4db8d (diff)
parent0af3b65880573aa9b3375362eaab4f84140c7dde (diff)
Merge commit '0af3b65880573aa9b3375362eaab4f84140c7dde'
* commit '0af3b65880573aa9b3375362eaab4f84140c7dde': asf: do not export XMP metadata by default Conflicts: libavformat/asfdec.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/asfdec.c8
-rw-r--r--libavformat/version.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 41e6c30f14..0a2e77e390 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -80,10 +80,12 @@ typedef struct ASFContext {
ASFStream *asf_st; ///< currently decoded stream
int no_resync_search;
+ int export_xmp;
} ASFContext;
static const AVOption options[] = {
{ "no_resync_search", "Don't try to resynchronize by looking for a certain optional start code", offsetof(ASFContext, no_resync_search), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
+ { "export_xmp", "Export full XMP metadata", offsetof(ASFContext, export_xmp), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
};
@@ -277,13 +279,17 @@ static void get_id3_tag(AVFormatContext *s, int len)
static void get_tag(AVFormatContext *s, const char *key, int type, int len, int type2_size)
{
- char *value;
+ ASFContext *asf = s->priv_data;
+ char *value = NULL;
int64_t off = avio_tell(s->pb);
#define LEN 22
if ((unsigned)len >= (UINT_MAX - LEN) / 2)
return;
+ if (!asf->export_xmp && !strncmp(key, "xmp", 3))
+ goto finish;
+
value = av_malloc(2 * len + LEN);
if (!value)
goto finish;
diff --git a/libavformat/version.h b/libavformat/version.h
index 08ab50be6f..6a5c3d53e0 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR 24
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \