Commit 7ac323c5 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: ttml: fix time parsing

as provided by Filip Roséen <filip@atch.se>
parent 5ba9e880
......@@ -70,14 +70,14 @@ static char *tt_genTiming( int64_t i_time )
{
if( i_time < 0 )
i_time = 0;
char *psz;
unsigned h, m, s, f;
f = (i_time % CLOCK_FREQ) / 10000;
unsigned f = (i_time % CLOCK_FREQ) / 10000;
i_time /= CLOCK_FREQ;
h = i_time / 3600;
m = (i_time - h) / 3600;
s = (i_time - h - m);
unsigned h = i_time / 3600;
unsigned m = i_time % 3600 / 60;
unsigned s = i_time % 60;
char *psz;
if( asprintf( &psz, "%2.2u:%2.2u:%2.2u.%2.2u",
h, m, s, f ) < 0 )
psz = NULL;
......
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