return !!sc->codec_ul;
}
-static uint64_t mxf_parse_timestamp(time_t timestamp)
+static uint64_t mxf_parse_timestamp(int64_t timestamp64)
{
+ time_t timestamp = timestamp64 / 1000000;
struct tm tmbuf;
struct tm *time = gmtime_r(×tamp, &tmbuf);
if (!time)
(uint64_t) time->tm_mday << 32 |
time->tm_hour << 24 |
time->tm_min << 16 |
- time->tm_sec << 8;
+ time->tm_sec << 8 |
+ (timestamp64 % 1000000) / 4000;
}
static void mxf_gen_umid(AVFormatContext *s)
sc->order = AV_RB32(sc->track_essence_element_key+12);
}
- if (ff_parse_creation_time_metadata(s, ×tamp, 1) > 0)
+ if (ff_parse_creation_time_metadata(s, ×tamp, 0) > 0)
mxf->timestamp = mxf_parse_timestamp(timestamp);
mxf->duration = -1;