[vlc-commits] input: check DEMUX_CAN_CONTROL_RATE on demux

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:15:24 2016 +0300| [f2ee786a2dda06e4b63a022cc2a399d738af4bf0] | committer: Rémi Denis-Courmont

input: check DEMUX_CAN_CONTROL_RATE on demux

This makes no difference. DEMUX_CAN_CONTROL_RATE only works with
"access_demux" plugins and always fails with "demux" plugins. The
end result is still:

	in->b_can_rate_control = in->b_can_pace_control;
	in->b_rescale_ts = true;

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2ee786a2dda06e4b63a022cc2a399d738af4bf0
---

 src/input/input.c |   22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index cd639d7..6690e7c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2323,28 +2323,20 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
         p_demux = p_demux->p_next;
     assert( p_demux->pf_demux != NULL || !in->b_can_pace_control );
 
-    if( p_demux->s == NULL )
+    if( !in->b_can_pace_control )
     {
-        if( !in->b_can_pace_control )
+        if( demux_Control( in->p_demux, DEMUX_CAN_CONTROL_RATE,
+                           &in->b_can_rate_control ) )
         {
-            if( demux_Control( p_demux, DEMUX_CAN_CONTROL_RATE,
-                                &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
-        {
-            in->b_can_rate_control = true;
+            in->b_can_rate_control = false;
             in->b_rescale_ts = true;
         }
+        else
+            in->b_rescale_ts = !in->b_can_rate_control;
     }
     else
     {
-        in->b_can_rate_control = in->b_can_pace_control;
+        in->b_can_rate_control = true;
         in->b_rescale_ts = true;
     }
 



More information about the vlc-commits mailing list