Commit 76cfaf8a authored by Jean-Paul Saman's avatar Jean-Paul Saman

Allowing for rate < 0 enables rewind playback for eg: RTSP streams.

Don't allow rate < 0 when p_input->p->input.b_rescale_ts is true.
Setting b_rescale_ts to true says to vlc, rescale the timestamp.
Setting it to false is like saying, I can completely handle the rate, just aknoledge the fact that the rate is not the default one.

(cherry picked from commit: ba6ebdc85b2738f46510e69812295a27e211b3c6)
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent d57d4de3
......@@ -146,6 +146,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
msg_Dbg( p_input, "Creating an input for '%s'", psz_name);
free( psz_name );
psz_name = NULL;
/* Start a timer to mesure how long it takes
* to launch an input */
......@@ -1646,7 +1647,12 @@ static bool Control( input_thread_t *p_input, int i_type,
}
}
if( i_rate < INPUT_RATE_MIN )
if( (i_rate < 0) && p_input->p->input.b_rescale_ts )
{
msg_Dbg( p_input, "cannot set negative rate" );
i_rate = INPUT_RATE_MIN;
}
else if( (i_rate > 0) && (i_rate < INPUT_RATE_MIN) )
{
msg_Dbg( p_input, "cannot set rate faster" );
i_rate = INPUT_RATE_MIN;
......
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