[vlc-devel] commit: Revert "snapshot: Don't use vlc_object_signal_maybe." ( Olivier Aubert )

git version control git at videolan.org
Mon Aug 18 15:48:48 CEST 2008


vlc | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Mon Aug 18 15:41:53 2008 +0200| [440d9541e63d7b84829f3dacd16a1420c3471167] | committer: Olivier Aubert 

Revert "snapshot: Don't use vlc_object_signal_maybe."

The p_dest object is indeed locked by the calling method (cf mediacontrol_snapshot in src/control/mediacontrol_audio_video.c).

This reverts commit ebbde26e5ea3f3c76845630463e45ee2ec92bd35.

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

 src/video_output/vout_intf.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index c0602d0..dea6782 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -147,7 +147,6 @@ void vout_ReleaseWindow( vout_thread_t *p_vout, void *dummy )
 int vout_ControlWindow( vout_thread_t *p_vout, void *dummy,
                         int i_query, va_list args )
 {
-    (void)dummy;
     vout_window_t *wnd = p_vout->p_window;
 
     if (wnd == NULL)
@@ -515,8 +514,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
         {
             msg_Err( p_vout, "Could not get snapshot" );
             image_HandlerDelete( p_image );
-            vlc_object_kill( p_dest );
-            vlc_thread_join( p_dest );
+            vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
             vlc_object_release( p_dest );
             return VLC_EGENERIC;
         }
@@ -528,7 +526,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
         {
             block_Release( p_block );
             image_HandlerDelete( p_image );
-            vlc_object_signal( p_dest );
+            vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
             vlc_object_release( p_dest );
             return VLC_ENOMEM;
         }
@@ -545,7 +543,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
             block_Release( p_block );
             free( p_snapshot );
             image_HandlerDelete( p_image );
-            vlc_object_signal( p_dest );
+            vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
             vlc_object_release( p_dest );
             return VLC_ENOMEM;
         }
@@ -556,7 +554,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
         block_Release( p_block );
 
         /* Unlock the object */
-        vlc_object_signal( p_dest ); /* Why do we signal here */
+        vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
         vlc_object_release( p_dest );
 
         image_HandlerDelete( p_image );




More information about the vlc-devel mailing list