avformat/asf: add helper functions to convert between filetime and avtime

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint
2026-06-14 01:16:18 +02:00
parent ce104d1054
commit 2b1cf52dbe
+11
View File
@@ -113,6 +113,17 @@ extern const AVMetadataConv ff_asf_metadata_conv[];
int ff_asf_handle_byte_array(AVFormatContext *s, const char *name,
int val_len);
/* convert from av time to windows filetime */
static inline int64_t ff_asf_avtime_to_filetime(int64_t avtime)
{
return avtime * 10 + 116444736000000000;
}
/* convert from windows filetime to av time */
static inline int64_t ff_asf_filetime_to_avtime(int64_t filetime)
{
return filetime / 10 - 11644473600000000;
}
#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000