diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c index 2f949564d5..0c97eb86c0 100644 --- a/libavcodec/jacosubdec.c +++ b/libavcodec/jacosubdec.c @@ -46,8 +46,8 @@ static int insert_datetime(AVBPrint *dst, const char *in, const char *arg) struct tm ltime; localtime_r(&now, <ime); - strftime(buf, sizeof(buf), arg, <ime); - av_bprintf(dst, "%s", buf); + if (strftime(buf, sizeof(buf), arg, <ime)) + av_bprintf(dst, "%s", buf); return 0; }