Commit 1fe4b1c3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Avoid POSIX-deprecated asctime_r()

parent c8b5e32b
......@@ -772,16 +772,15 @@ void matroska_segment_c::ParseInfo( KaxInfo *info )
KaxDateUTC &date = *(KaxDateUTC*)l;
time_t i_date;
struct tm tmres;
char buffer[256];
char buffer[25];
i_date = date.GetEpochDate();
memset( buffer, 0, 256 );
if( gmtime_r( &i_date, &tmres ) &&
asctime_r( &tmres, buffer ) )
strftime( buffer, sizeof(buffer), "%a %b %d %H:%M:%S %Y",
&tmres ) )
{
buffer[strlen( buffer)-1]= '\0';
psz_date_utc = strdup( buffer );
msg_Dbg( &sys.demuxer, "| | + Date=%s", psz_date_utc );
msg_Dbg( &sys.demuxer, "| | + Date=%s", buffer );
}
}
else if( MKV_IS_ID( l, KaxChapterTranslate ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment