summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-03 02:43:24 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-08 13:53:30 +0000
commitb704b648f9ecb830874627db958a37e004107d1b (patch)
tree8df79abc54f40a44974b5e36fe3accf73a5d7e9a /libavformat/mov.c
parent174c5fde90060faab67796a5eaef742630f1db6e (diff)
mov: parse XMP metadata on demand
The Extensible Metadata Platform tag can contain various kind of data which are not strictly related to the video file, such as history of edits and saves from the project file. So display XMP metadata only when the user explicitly requires it. Based on a patch by Marek Fort <marek.fort@chyronhego.com>.
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5950c42b67..8124d690b1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -263,6 +263,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
switch (atom.type) {
case MKTAG( '@','P','R','M'): key = "premiere_version"; raw = 1; break;
case MKTAG( '@','P','R','Q'): key = "quicktime_version"; raw = 1; break;
+ case MKTAG( 'X','M','P','_'):
+ if (c->export_xmp) { key = "xmp"; raw = 1; } break;
case MKTAG( 'a','A','R','T'): key = "album_artist"; break;
case MKTAG( 'c','p','r','t'): key = "copyright"; break;
case MKTAG( 'd','e','s','c'): key = "description"; break;
@@ -3431,6 +3433,8 @@ static int mov_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
static const AVOption mov_options[] = {
{ "export_all", "Export unrecognized metadata entries", OFFSET(export_all),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS },
+ { "export_xmp", "Export full XMP metadata", OFFSET(export_xmp),
+ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS },
{ NULL },
};