[FFmpeg-devel] libavformat/hlsenc + configure: question about default strftime() format string
Bodecs Bela
bodecsb at vivanet.hu
Thu Dec 29 02:32:33 EET 2016
Dear All,
in hlcenc.c, in the hls_write_header() function the default format
string for strftime() function contains %s specifier.
const char *pattern_localtime_fmt = "-%s.ts";
This %s specifier will insert the seconds since EPOCH. But %s is not
available on all system/environment.
I have found this bug, but to retain current behavior, this situation is
manageable by a test-run of strftime() with %s and only if it fails then
alter the format string for something else.
But I thought that It should be handled at preprocessing like:
#if HAVE....
const char *pattern_localtime_fmt = "-%s.ts";
#else
const char *pattern_localtime_fmt = "-%Y%m%d%H%I%S.ts";
#endif
I tried to find in config.h something similar like #define
HAVE_EPOCH_SECONDS 1, but did not find.
My questions are the followings:
1. is there a pre-defined config parameter to use here?
2. If not, is there a prefered way: a new config parameter on %s
availability or a function to test the %s parameter availability at runtime?
thank you in advance,
Bela Bodecs
More information about the ffmpeg-devel
mailing list