[FFmpeg-devel] parse_date using localtime etc.

Michael Niedermayer michaelni
Fri Feb 6 11:53:51 CET 2009

On Fri, Feb 06, 2009 at 11:11:05AM +0100, Reimar D?ffinger wrote:
> Hello,
> as it came out during a recent discussion, parse_date uses the
> non-thread-safe functions localtime and gmtime.
> This is not much of an issue currently, since libav* does not use that
> code path.
> However I still have a bad feeling about it, since libav* functions are
> expected to not have global side-effects and to be thread safe.
> The question is what to do about it.

use localtime_r()

besides it has to be mentiond that some libcs like microsofts according
to google provide a thread safe localtime() with thread local storeage.
And IMO having a thread safe libc in addition to a unsafe one would have
been nicer for posix instead of duplicating functions with differnt API.

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090206/9919c258/attachment.pgp>

More information about the ffmpeg-devel mailing list