Opened 13 years ago

Closed 12 years ago

#992 closed enhancement (fixed)

avoid strptime() dependancy, it seems unavailable on windows

Reported by: Matt Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: strptime
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Because strptime isn't available natively for windows one cannot set the creation time of a file in ffmpeg (see the HAVE_STRPTIME flag in libavformat\utils.c line 4091).

I want to request that it be added for windows as well. There's a GPL implementation of strptime here http://plibc.sourceforge.net/doxygen/strptime_8c-source.html which adds Windows support for strptime. It'd be great if that could be added to ffmpeg.

Change History (5)

comment:1 by Carl Eugen Hoyos, 13 years ago

GPL is not good in a function used in libavformat/utils.c...

in reply to:  1 comment:2 by Matt, 13 years ago

Replying to cehoyos:

GPL is not good in a function used in libavformat/utils.c...

True, but it's better than nothing? It could be placed under a GPL guard so if you compile as gpl it's available, otherwise it's not, like at present.

The original is actually available as LGPL (http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=time/strptime_l.c;hb=HEAD).

comment:3 by Carl Eugen Hoyos, 13 years ago

Perhaps you should make your request (with above link) to the mingw developers?

comment:4 by Michael Niedermayer, 12 years ago

Summary: strptime on windowsavoid strptime() dependancy, it seems unavailable on windows

in reply to:  description comment:5 by Stefano Sabatini, 12 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Replying to MattE:

Because strptime isn't available natively for windows one cannot set the creation time of a file in ffmpeg (see the HAVE_STRPTIME flag in libavformat\utils.c line 4091).

I want to request that it be added for windows as well. There's a GPL implementation of strptime here http://plibc.sourceforge.net/doxygen/strptime_8c-source.html which adds Windows support for strptime. It'd be great if that could be added to ffmpeg.

Should be fixed in:

commit 29e972f67c914d35417bc7368493d2617abdd26e
Author: Stefano Sabatini <stefasab@gmail.com>
Date:   Sat Sep 1 13:32:43 2012 +0200

    lavu/parseutils: add av_small_strptime()
    
    Make internal small_strptime() function public, and use it in place of
    strptime().
    This allows to avoid a dependency on strptime() on systems which do not
    support it.
    
    In particular, fix trac ticket #992.
Note: See TracTickets for help on using tickets.