[vlc-devel] commit: Fix 0448c670c32d9fc60889ce2c3e8f72330a389e44 as I forgot to use pl_Yield instead of vlc_object_find . ( Rémi Duraffort )

git version control git at videolan.org
Tue May 27 19:51:14 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue May 27 19:20:28 2008 +0200| [85c5476d316e6697abe423ef65894942eb999367]

Fix 0448c670c32d9fc60889ce2c3e8f72330a389e44 as I forgot to use pl_Yield instead of vlc_object_find.
And fix some other use of vlc_object_find for the playlist.

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

 modules/video_output/sdl.c         |   19 ++++++++-----------
 modules/video_output/x11/xcommon.c |   24 ++++++++----------------
 2 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c
index 27f2ea2..be76ba7 100644
--- a/modules/video_output/sdl.c
+++ b/modules/video_output/sdl.c
@@ -439,15 +439,14 @@ static int Manage( vout_thread_t *p_vout )
                     val.b_bool = true;
                     var_Set( p_vout, "mouse-clicked", val );
 
-                    p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
-                                                FIND_ANYWHERE );
+                    p_playlist = pl_Yield( p_vout );
 
                     if( p_playlist != NULL )
                     {
                         vlc_value_t val;
                         val.b_bool = false;
                         var_Set( p_playlist, "intf-popupmenu", val );
-                        vlc_object_release( p_playlist );
+                        pl_Release( p_playlist );
                     }
                 }
                 break;
@@ -460,15 +459,14 @@ static int Manage( vout_thread_t *p_vout )
                     val.i_int &= ~2;
                     var_Set( p_vout, "mouse-button-down", val );
 
-                    p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
-                                              FIND_ANYWHERE );
+                    p_playlist = pl_Yield( p_vout );
                     if( p_playlist != NULL )
                     {
                         vlc_value_t val;
                         var_Get( p_playlist, "intf-show", &val );
                         val.b_bool = !val.b_bool;
                         var_Set( p_playlist, "intf-show", val );
-                        vlc_object_release( p_playlist );
+                        pl_Release( p_playlist );
                     }
                 }
                 break;
@@ -489,15 +487,14 @@ static int Manage( vout_thread_t *p_vout )
                         vlc_object_release( p_intf );
                     }
 
-                    p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
-                                                FIND_ANYWHERE );
+                    p_playlist = pl_Yield( p_vout );
 
                     if( p_playlist != NULL )
                     {
                         vlc_value_t val;
                         val.b_bool = true;
                         var_Set( p_playlist, "intf-popupmenu", val );
-                        vlc_object_release( p_playlist );
+                        pl_Release( p_playlist );
                     }
                 }
                 break;
@@ -537,11 +534,11 @@ static int Manage( vout_thread_t *p_vout )
         /* Quit event (close the window) */
         case SDL_QUIT:
             {
-                playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+                playlist_t *p_playlist = pl_Yield( p_vout );
                 if( p_playlist != NULL )
                 {
                     playlist_Stop( p_playlist );
-                    vlc_object_release( p_playlist );
+                    pl_Release( p_playlist );
                 }
             }
             break;
diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c
index d6d625b..deb9569 100644
--- a/modules/video_output/x11/xcommon.c
+++ b/modules/video_output/x11/xcommon.c
@@ -1300,14 +1300,12 @@ static int ManageVideo( vout_thread_t *p_vout )
                         val.b_bool = true;
                         var_Set( p_vout, "mouse-clicked", val );
 
-                        p_playlist = vlc_object_find( p_vout,
-                                                      VLC_OBJECT_PLAYLIST,
-                                                      FIND_ANYWHERE );
+                        p_playlist = pl_Yield( p_vout );
                         if( p_playlist != NULL )
                         {
                             vlc_value_t val; val.b_bool = false;
                             var_Set( p_playlist, "intf-popupmenu", val );
-                            vlc_object_release( p_playlist );
+                            pl_Release( p_playlist );
                         }
                     }
                     break;
@@ -1320,16 +1318,14 @@ static int ManageVideo( vout_thread_t *p_vout )
                         val.i_int &= ~2;
                         var_Set( p_vout, "mouse-button-down", val );
 
-                        p_playlist = vlc_object_find( p_vout,
-                                                      VLC_OBJECT_PLAYLIST,
-                                                      FIND_ANYWHERE );
+                        p_playlist = pl_Yield( p_vout );
                         if( p_playlist != NULL )
                         {
                             vlc_value_t val;
                             var_Get( p_playlist, "intf-show", &val );
                             val.b_bool = !val.b_bool;
                             var_Set( p_playlist, "intf-show", val );
-                            vlc_object_release( p_playlist );
+                            pl_Release( p_playlist );
                         }
                     }
                     break;
@@ -1350,14 +1346,12 @@ static int ManageVideo( vout_thread_t *p_vout )
                             vlc_object_release( p_intf );
                         }
 
-                        p_playlist = vlc_object_find( p_vout,
-                                                      VLC_OBJECT_PLAYLIST,
-                                                      FIND_ANYWHERE );
+                        p_playlist = pl_Yield( p_vout );
                         if( p_playlist != NULL )
                         {
                             vlc_value_t val; val.b_bool = true;
                             var_Set( p_playlist, "intf-popupmenu", val );
-                            vlc_object_release( p_playlist );
+                            pl_Release( p_playlist );
                         }
                     }
                     break;
@@ -1488,13 +1482,11 @@ static int ManageVideo( vout_thread_t *p_vout )
                      == p_vout->p_sys->p_win->wm_delete_window ) )
         {
             /* the user wants to close the window */
-            playlist_t * p_playlist =
-                (playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
-                                               FIND_ANYWHERE );
+            playlist_t * p_playlist = pl_Yield( p_vout );
             if( p_playlist != NULL )
             {
                 playlist_Stop( p_playlist );
-                vlc_object_release( p_playlist );
+                pl_Release( p_playlist );
             }
         }
     }




More information about the vlc-devel mailing list