Commit 67660969 authored by Tristan Matthews's avatar Tristan Matthews

demux: mpc: use CLOCK_FREQ

parent 8a9ac878
......@@ -280,7 +280,7 @@ static int Demux( demux_t *p_demux )
/* */
p_data->i_buffer = i_ret * sizeof(MPC_SAMPLE_FORMAT) * p_sys->info.channels;
p_data->i_dts = p_data->i_pts =
VLC_TS_0 + INT64_C(1000000) * p_sys->i_position / p_sys->info.sample_freq;
VLC_TS_0 + CLOCK_FREQ * p_sys->i_position / p_sys->info.sample_freq;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_data->i_dts );
......@@ -312,10 +312,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_LENGTH:
pi64 = (int64_t*)va_arg( args, int64_t * );
#ifndef HAVE_MPC_MPCDEC_H
*pi64 = INT64_C(1000000) * p_sys->info.pcm_samples /
*pi64 = CLOCK_FREQ * p_sys->info.pcm_samples /
p_sys->info.sample_freq;
#else
*pi64 = INT64_C(1000000) * (p_sys->info.samples -
*pi64 = CLOCK_FREQ * (p_sys->info.samples -
p_sys->info.beg_silence) /
p_sys->info.sample_freq;
#endif
......@@ -338,7 +338,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
*pi64 = INT64_C(1000000) * p_sys->i_position /
*pi64 = CLOCK_FREQ * p_sys->i_position /
p_sys->info.sample_freq;
return VLC_SUCCESS;
......
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