]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/fileinfo.cpp: do not use p_intf->p_sys->p_input to
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 15 May 2005 13:20:55 +0000 (13:20 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 15 May 2005 13:20:55 +0000 (13:20 +0000)
   get the input thread, as this does not work when called through the dialogs
   provider. Use vlc_object_find() instead.

modules/gui/wxwindows/dialogs.cpp
modules/gui/wxwindows/fileinfo.cpp

index fb166c28377d048615c0b2af6e8700408b8e15e1..78c3af86a6c55091fa4e1b599e6b4ac9bf2c2f37 100644 (file)
@@ -232,17 +232,17 @@ DialogsProvider::~DialogsProvider()
 
 void DialogsProvider::OnIdle( wxIdleEvent& WXUNUSED(event) )
 {
-  /* Update the log window */
-  if( p_messages_dialog )
-    p_messages_dialog->UpdateLog();
+    /* Update the log window */
+    if( p_messages_dialog )
+        p_messages_dialog->UpdateLog();
 
-  /* Update the playlist */
-  if( p_playlist_dialog )
-    p_playlist_dialog->UpdatePlaylist();
+    /* Update the playlist */
+    if( p_playlist_dialog )
+        p_playlist_dialog->UpdatePlaylist();
 
-  /* Update the fileinfo windows */
-  if( p_fileinfo_dialog )
-    p_fileinfo_dialog->UpdateFileInfo();
+    /* Update the fileinfo windows */
+    if( p_fileinfo_dialog )
+        p_fileinfo_dialog->UpdateFileInfo();
 }
 
 void DialogsProvider::OnPlaylist( wxCommandEvent& WXUNUSED(event) )
index b229d9a2d74127522e2c68a74ff2e953fdeda966..43ec5a29234d582534a11aea2f655ee6aaea1854 100644 (file)
@@ -101,7 +101,9 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
 
 void FileInfo::UpdateFileInfo()
 {
-    input_thread_t *p_input = p_intf->p_sys->p_input;
+    input_thread_t *p_input =
+        (input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+                                           FIND_ANYWHERE );
 
     if( !p_input || p_input->b_dead || !p_input->input.p_item->psz_name )
     {
@@ -110,6 +112,10 @@ void FileInfo::UpdateFileInfo()
             fileinfo_root_label = wxT("");
             fileinfo_tree->DeleteChildren( fileinfo_root );
         }
+        if (p_input)
+        {
+            vlc_object_release(p_input);
+        }
         return;
     }
 
@@ -126,6 +132,7 @@ void FileInfo::UpdateFileInfo()
     else if( fileinfo_root_label == wxL2U(p_input->input.p_item->psz_name) &&
              b_need_update == VLC_FALSE )
     {
+        vlc_object_release(p_input);
         return;
     }
 
@@ -153,6 +160,7 @@ void FileInfo::UpdateFileInfo()
 
     b_need_update = VLC_FALSE;
 
+    vlc_object_release(p_input);
     return;
 }