[FFmpeg-devel] libavformat/hlsenc + configure: question about default strftime() format string
Steven Liu
lingjiujianke at gmail.com
Thu Dec 29 04:33:59 EET 2016
2016-12-29 8:32 GMT+08:00 Bodecs Bela <bodecsb at vivanet.hu>:
> 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,
>
>
You can refer to configure file HAVE_LIST to support this option.
> Bela Bodecs
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list