Ticket #992 (closed enhancement: fixed)
avoid strptime() dependancy, it seems unavailable on windows
| Reported by: | MattE | 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
comment:2 in reply to: ↑ 1 Changed 16 months ago by MattE
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 Changed 16 months ago by cehoyos
Perhaps you should make your request (with above link) to the mingw developers?
comment:4 Changed 9 months ago by michael
- Summary changed from strptime on windows to avoid strptime() dependancy, it seems unavailable on windows
comment:5 in reply to: ↑ description Changed 9 months ago by saste
- Analyzed by developer set
- Status changed from new to closed
- Resolution set to fixed
- Reproduced by developer set
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.



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