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

Baptiste Coudurier baptiste.coudurier
Thu Feb 5 23:07:18 CET 2009


Hi,

On 2/5/2009 1:03 PM, 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(&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?

Seems so, anyway I don't make the specs.

Besides which format specifies the time zone ?
mov/mp4 doesn't, at least.

> Anyway, you can not use localtime, it is not thread-safe.

localtime is used in libavformat parse_date, though this is not an 
argument. How important is the thread safety here ?
It is really not like time having 1 second difference is a problem, no ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org




More information about the ffmpeg-cvslog mailing list