[FFmpeg-cvslog] r17011 - trunk/libavformat/mxfenc.c

Reimar Döffinger Reimar.Doeffinger
Thu Feb 5 22:03:06 CET 2009


On Thu, Feb 05, 2009 at 09:15:18PM +0100, bcoudurier wrote:
> +static uint64_t mxf_parse_timestamp(time_t timestamp)
> +{
> +    struct tm *time = localtime(&timestamp);
> +    return (uint64_t)(time->tm_year+1900) << 48 |
> +           (uint64_t)(time->tm_mon+1)     << 40 |
> +           (uint64_t) time->tm_mday       << 32 |
> +                      time->tm_hour       << 24 |
> +                      time->tm_min        << 16 |
> +                      time->tm_sec        << 8;
> +}

Huh, the time is stored in a timezone-dependent format without storing
the time zone?
Anyway, you can not use localtime, it is not thread-safe.




More information about the ffmpeg-cvslog mailing list