[vlc-devel] commit: libvlc_media_player_set_rate: Allow for changing playout rate. ( Jean-Paul Saman )

git version control git at videolan.org
Tue Mar 10 10:55:23 CET 2009


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Tue Mar 10 10:24:28 2009 +0100| [bf8c4fd1c213653c8d080c7d09033399e0afe9e4] | committer: Jean-Paul Saman 

libvlc_media_player_set_rate: Allow for changing playout rate.

This fixes a regression introduced in commit: 75adef44b044b9b81e593e74db857d6b2a7e4eaa

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

 src/control/media_player.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/control/media_player.c b/src/control/media_player.c
index 161bc34..bc4d4a9 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -1097,15 +1097,12 @@ void libvlc_media_player_set_rate(
     vlc_value_t val;
     bool b_can_rewind;
 
-    if( rate != 0 )
-        RAISEVOID( "Rate value is invalid" );
-
-    p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
+    p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
     if( !p_input_thread )
         return;
 
     b_can_rewind = var_GetBool( p_input_thread, "can-rewind" );
-    if( (rate < 0) && !b_can_rewind )
+    if( (rate < 0.0) && !b_can_rewind )
     {
         vlc_object_release( p_input_thread );
         libvlc_exception_raise( p_e, "Rate value is invalid" );




More information about the vlc-devel mailing list