Skip to content
Snippets Groups Projects
Commit cd693748 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

pulse: assume pa_usec_t is in microseconds

As the name suggests.
VLC_TICK_FROM_US() is already used in many places for that.

The hardcoded value for DEMUX_GET_TIME was bogus.
parent c57d6e32
No related branches found
No related tags found
1 merge request!6867pulse: assume pa_usec_t is in microseconds
Pipeline #566360 passed with stage
in 34 minutes and 45 seconds
......@@ -169,9 +169,9 @@ static void stream_read_cb(pa_stream *s, size_t length, void *userdata)
return;
}
if (negative)
pts += latency;
pts += VLC_TICK_FROM_US(latency);
else
pts -= latency;
pts -= VLC_TICK_FROM_US(latency);
es_out_SetPCR(demux->out, pts);
if (unlikely(sys->es == NULL))
......@@ -206,7 +206,7 @@ static int Control(demux_t *demux, int query, va_list ap)
if (pa_stream_get_time(sys->stream, &us) < 0)
return VLC_EGENERIC;
*(va_arg(ap, vlc_tick_t *)) = us * 10000000LL / CLOCK_FREQ;
*(va_arg(ap, vlc_tick_t *)) = VLC_TICK_FROM_US(us);
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment