* src/input/input_ext-plugins.c: fixed previous commit.
authorGildas Bazin <gbazin@videolan.org>
Sun, 20 Jul 2003 20:33:17 +0000 (20:33 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 20 Jul 2003 20:33:17 +0000 (20:33 +0000)
* modules/gui/wxwindows/interface.cpp: fixed a couple of bugs.

modules/gui/wxwindows/interface.cpp
src/input/input_ext-plugins.c

index 196ed19..e953556 100644 (file)
@@ -2,7 +2,7 @@
  * interface.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.50 2003/07/20 10:38:49 gbazin Exp $
+ * $Id: interface.cpp,v 1.51 2003/07/20 20:33:17 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -633,12 +633,7 @@ void Interface::OnPlayStream( wxCommandEvent& WXUNUSED(event) )
     playlist_t *p_playlist =
         (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                        FIND_ANYWHERE );
-    if( p_playlist == NULL )
-    {
-        /* If the playlist is empty, open a file requester instead */
-        OnShowDialog( dummy );
-        return;
-    }
+    if( p_playlist == NULL ) return;
 
     if( p_playlist->i_size )
     {
@@ -672,7 +667,7 @@ void Interface::OnPlayStream( wxCommandEvent& WXUNUSED(event) )
     }
     else
     {
-        vlc_mutex_unlock( &p_playlist->object_lock );
+        /* If the playlist is empty, open a file requester instead */
         vlc_object_release( p_playlist );
         OnShowDialog( dummy );
     }
index 6862de4..58f82e7 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-plugins.c: useful functions for access and demux plug-ins
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: input_ext-plugins.c,v 1.33 2003/07/20 15:17:47 gbazin Exp $
+ * $Id: input_ext-plugins.c,v 1.34 2003/07/20 20:33:17 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -490,11 +490,6 @@ ssize_t input_FillBuffer( input_thread_t * p_input )
 
     while( p_buf == NULL )
     {
-        if( p_input->b_die || p_input->b_error || p_input->b_eof )
-        {
-            return -1;
-        }
-
         p_buf = NewBuffer( p_input->p_method_data,
                            i_remains + p_input->i_bufsize, VLC_FALSE );
         if( p_buf == NULL )
@@ -503,6 +498,11 @@ ssize_t input_FillBuffer( input_thread_t * p_input )
             msg_Err( p_input,
                      "failed allocating a new buffer (decoder stuck?)" );
             msleep( INPUT_IDLE_SLEEP );
+
+            if( p_input->b_die || p_input->b_error || p_input->b_eof )
+            {
+                return -1;
+            }
         }
     }