[vlc-devel] commit: snapshot: Don't use vlc_object_signal_maybe. (Pierre d'Herbemont )

git version control git at videolan.org
Wed Aug 13 00:54:37 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed Aug 13 00:21:51 2008 +0200| [ebbde26e5ea3f3c76845630463e45ee2ec92bd35] | committer: Pierre d'Herbemont 

snapshot: Don't use vlc_object_signal_maybe.

The object isn't locked at this time. Yet, could some check that we do need that signal. I tend to doubt about that.

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

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

diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 4d9a755..77b94e6 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -147,6 +147,7 @@ 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)
@@ -514,7 +515,8 @@ 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_signal_maybe( VLC_OBJECT(p_dest) );
+            vlc_object_kill( p_dest );
+            vlc_thread_join( p_dest );
             vlc_object_release( p_dest );
             return VLC_EGENERIC;
         }
@@ -526,7 +528,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
         {
             block_Release( p_block );
             image_HandlerDelete( p_image );
-            vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
+            vlc_object_signal( p_dest );
             vlc_object_release( p_dest );
             return VLC_ENOMEM;
         }
@@ -543,7 +545,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_maybe( VLC_OBJECT(p_dest) );
+            vlc_object_signal( p_dest );
             vlc_object_release( p_dest );
             return VLC_ENOMEM;
         }
@@ -554,7 +556,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
         block_Release( p_block );
 
         /* Unlock the object */
-        vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
+        vlc_object_signal( p_dest ); /* Why do we signal here */
         vlc_object_release( p_dest );
 
         image_HandlerDelete( p_image );




More information about the vlc-devel mailing list