[vlc-devel] commit: Clean up spu/filters when a vout module cannot be loaded. ( Laurent Aimar )

git version control git at videolan.org
Mon Jun 30 20:50:18 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jun 30 18:52:20 2008 +0000| [674ccb48ec8ccda0e077a6e6ec423cf02a69a160]

Clean up spu/filters when a vout module cannot be loaded.
(The clean up path of vout is in a need of more cleaning).

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 544f302..122fd2c 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -395,6 +395,8 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
     if( p_vout->p_module == NULL )
     {
         msg_Err( p_vout, "no suitable vout module" );
+        // FIXME it's ugly but that's exactly the function that need to be called.
+        EndThread( p_vout );
         vlc_object_detach( p_vout );
         vlc_object_release( p_vout );
         return NULL;
@@ -1214,6 +1216,8 @@ static void EndThread( vout_thread_t *p_vout )
     }
 #endif
 
+    /* FIXME does that function *really* need to be called inside the thread ? */
+
     /* Destroy subpicture unit */
     spu_Attach( p_vout->p_spu, VLC_OBJECT(p_vout), false );
     spu_Destroy( p_vout->p_spu );




More information about the vlc-devel mailing list