[FFmpeg-cvslog] r17011 - trunk/libavformat/mxfenc.c
Reimar Döffinger
Reimar.Doeffinger
Thu Feb 5 22:06:50 CET 2009
On Thu, Feb 05, 2009 at 10:03:06PM +0100, Reimar D?ffinger wrote:
> 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(×tamp);
> > + 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.
Sorry, pressed "send" too fast.
I meant to say, gmtime_r sounds like it might be what you wanted, but
even though it is POSIX, I have some doubts if it is available on e.g.
OS/2...
More information about the ffmpeg-cvslog
mailing list