[FFmpeg-devel] [PATCH] ifv: populate creation_time
Peter Ross
pross at xvid.org
Mon Jul 1 15:25:45 EEST 2019
---
Small patch, to extract timestamp from IFV file header.
libavformat/ifv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/ifv.c b/libavformat/ifv.c
index 03c682bb9d..6acbb29a75 100644
--- a/libavformat/ifv.c
+++ b/libavformat/ifv.c
@@ -90,7 +90,10 @@ static int parse_header(AVFormatContext *s)
uint32_t aud_magic;
uint32_t vid_magic;
- avio_skip(s->pb, 0x5c);
+ avio_skip(s->pb, 0x34);
+ avpriv_dict_set_timestamp(&s->metadata, "creation_time", avio_rl32(s->pb) * 1000000LL);
+ avio_skip(s->pb, 0x24);
+
ifv->width = avio_rl16(s->pb);
ifv->height = avio_rl16(s->pb);
--
2.20.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190701/b8d32594/attachment.sig>
More information about the ffmpeg-devel
mailing list