diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index a6b46f651..89e6df7a3 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -80,8 +80,6 @@ #include #include #include -#include -#include //NI InfoIcons #include @@ -3256,11 +3254,13 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover) cover = false; autoshot = false; forcover = false; - std::time_t t = std::time(NULL); - std::tm tm = *std::localtime(&t); - std::stringstream ss; - ss << std::put_time(&tm, "%Y%m%d_%H%M%S"); - tmp_str = ss.str(); + struct timeval tv; + gettimeofday(&tv, NULL); + char buf_time[128]; + strftime(buf_time, sizeof(buf_time) , "_%Y%m%d_%H%M%S", localtime(&tv.tv_sec)); + size_t pos = strlen(buf_time); + snprintf(&(buf_time[pos]), sizeof(buf_time) - pos - 1, "_%03d", (int) tv.tv_usec/1000); + tmp_str = buf_time; } tmp_str += ending; std::string::size_type pos = fname.find_last_of('.');