[vlc-commits] input: remove second flag in DEMUX_CAN_CONTROL_RATE
Rémi Denis-Courmont
git at videolan.org
Thu Jun 16 23:21:01 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 17 00:01:57 2016 +0300| [e33dcaa877f5a83a4dc66c67861e1207a6a60fcc] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e33dcaa877f5a83a4dc66c67861e1207a6a60fcc
---
include/vlc_demux.h | 8 ++++----
modules/access/live555.cpp | 2 --
src/input/input.c | 4 +++-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index a520c52..2a4b08f 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -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 */
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index 44d968c..700c4c5 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -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:
diff --git a/src/input/input.c b/src/input/input.c
index cbe1f5f..61a92e0 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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
{
More information about the vlc-commits
mailing list