[FFmpeg-devel] [PATCH 1/2] avformat/mov: add mov_metadata_int16()
Moritz Barsnick
barsnick at gmx.net
Wed Sep 19 16:45:27 EEST 2018
Allows to read 16-bit integer atoms (currently only tmpo known to
be such).
Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
---
libavformat/mov.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index ec57a05803..03c39d0e5d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -111,6 +111,15 @@ static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb,
return 0;
}
+static int mov_metadata_int16(MOVContext *c, AVIOContext *pb,
+ unsigned len, const char *key)
+{
+ c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED;
+ av_dict_set_int(&c->fc->metadata, key, avio_rb16(pb), 0);
+
+ return 0;
+}
+
static int mov_metadata_int8_no_padding(MOVContext *c, AVIOContext *pb,
unsigned len, const char *key)
{
--
2.14.4
More information about the ffmpeg-devel
mailing list