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

input: remove second flag in DEMUX_CAN_CONTROL_RATE

Only one of the demuxer actually set the flag (at all), live555. That
is also the only demuxer that supports rate control, so infer the value
accordingly.
parent a5cfe8b4
......@@ -277,10 +277,10 @@ enum demux_query_e
/* II. Specific access_demux queries */
/* DEMUX_CAN_CONTROL_RATE is called only if DEMUX_CAN_CONTROL_PACE has returned false.
* *pb_rate should be true when the rate can be changed (using DEMUX_SET_RATE)
* *pb_ts_rescale should be true when the timestamps (pts/dts/pcr) have to be rescaled */
DEMUX_CAN_CONTROL_RATE, /* arg1= bool*pb_rate arg2= bool*pb_ts_rescale can fail(assume false) */
/* DEMUX_CAN_CONTROL_RATE is called only if DEMUX_CAN_CONTROL_PACE has
* returned false. *pb_rate should be true when the rate can be changed
* (using DEMUX_SET_RATE). */
DEMUX_CAN_CONTROL_RATE, /* arg1= bool*pb_rate */
/* DEMUX_SET_RATE is called only if DEMUX_CAN_CONTROL_RATE has returned true.
* It should return the value really used in *pi_rate */
DEMUX_SET_RATE, /* arg1= int*pi_rate can fail */
......
......@@ -1573,13 +1573,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_CAN_CONTROL_RATE:
pb = (bool*)va_arg( args, bool * );
pb2 = (bool*)va_arg( args, bool * );
*pb = (p_sys->rtsp != NULL) &&
(p_sys->f_npt_length > 0) &&
( !var_GetBool( p_demux, "rtsp-kasenna" ) ||
!var_GetBool( p_demux, "rtsp-wmserver" ) );
*pb2 = false;
return VLC_SUCCESS;
case DEMUX_SET_RATE:
......
......@@ -2337,11 +2337,13 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
if( !in->b_can_pace_control )
{
if( demux_Control( p_demux, DEMUX_CAN_CONTROL_RATE,
&in->b_can_rate_control, &in->b_rescale_ts ) )
&in->b_can_rate_control ) )
{
in->b_can_rate_control = false;
in->b_rescale_ts = true; /* not used */
}
else
in->b_rescale_ts = !in->b_can_rate_control;
}
else
{
......
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