[FFmpeg-devel] [PATCH 2/3] lavf/mxfdec: use more widely supported time format string

Matthieu Bouron matthieu.bouron at gmail.com
Sat Apr 13 16:29:15 CEST 2013


On Sat, Apr 13, 2013 at 03:45:56PM +0200, Hendrik Leppkes wrote:
> MSVC lacks support for %T and %F, but the standard specifies them
> only as shorthands to the long variants.
> ---
>  libavformat/mxfdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index adc5c68..6306756 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -1671,7 +1671,7 @@ static int mxf_timestamp_to_str(uint64_t timestamp, char **str)
>      *str = av_mallocz(32);
>      if (!*str)
>          return AVERROR(ENOMEM);
> -    strftime(*str, 32, "%F %T", &time);
> +    strftime(*str, 32, "%Y-%m-%d %H:%M:%S", &time);
>  
>      return 0;
>  }
> -- 
> 1.8.1.msysgit.1
> 

LGTM according to strftime's man.


More information about the ffmpeg-devel mailing list