[vlc-devel] [PATCH] Increased RC interface input buffer and fixed logic errors

Ken Self kenself at optusnet.com.au
Thu Jan 15 11:00:51 CET 2009


---
 modules/control/rc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 23a7b05..ba5ba7e 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -65,7 +65,7 @@
 #    include <sys/un.h>
 #endif
 
-#define MAX_LINE_LENGTH 256
+#define MAX_LINE_LENGTH 1024
 #define STATUS_CHANGE "status change: "
 
 /* input_state_e from <vlc_input.h> */
@@ -1046,12 +1046,14 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
     intf_thread_t *p_intf = (intf_thread_t*)p_this;
     input_thread_t *p_input;
     vlc_value_t     val;
+    playlist_t *p_playlist = pl_Hold( p_this );
 
     p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE );
     if( !p_input ) return VLC_ENOOBJ;
 
     var_Get( p_input, "state", &val );
-    if( ( ( val.i_int == PAUSE_S ) || ( val.i_int == PLAYLIST_PAUSED ) ) &&
+    if( ( ( val.i_int == PAUSE_S ) ||
+          ( playlist_Status( p_playlist ) == PLAYLIST_PAUSED ) ) &&
         ( strcmp( psz_cmd, "pause" ) != 0 ) )
     {
         msg_rc( _("Press menu select or pause to continue.") );
@@ -1328,7 +1330,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
         var_Get( p_input, "state", &val );
         vlc_object_release( p_input );
 
-        if( ( val.i_int == PAUSE_S ) || ( val.i_int == PLAYLIST_PAUSED ) )
+        if( ( val.i_int == PAUSE_S ) ||
+            ( playlist_Status( p_playlist ) == PLAYLIST_PAUSED ) )
         {
             msg_rc( _("Type 'menu select' or 'pause' to continue.") );
             pl_Release( p_this );
@@ -1542,7 +1545,7 @@ static int Quit( vlc_object_t *p_this, char const *psz_cmd,
 {
     VLC_UNUSED(p_data); VLC_UNUSED(psz_cmd);
     VLC_UNUSED(oldval); VLC_UNUSED(newval);
-    
+
     vlc_object_kill( p_this->p_libvlc );
     return VLC_SUCCESS;
 }
-- 
1.5.4.3




More information about the vlc-devel mailing list