[vlc-devel] commit: Fixed direct3d open error handling. (Laurent Aimar )

git version control git at videolan.org
Sat Apr 25 14:04:13 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Apr 25 14:02:57 2009 +0200| [af6b0c4a9255c5f39a02a0c8e1b5288bc8600866] | committer: Laurent Aimar 

Fixed direct3d open error handling.

At least a non allocated lock was released.

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

 modules/video_output/msw/direct3d.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index dcebe6f..91963e4 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -167,7 +167,9 @@ static int OpenVideo( vlc_object_t *p_this )
     if( VLC_SUCCESS != Direct3DVoutCreate( p_vout ) )
     {
         msg_Err( p_vout, "Direct3D could not be initialized !");
-        goto error;
+        Direct3DVoutRelease( p_vout );
+        free( p_vout->p_sys );
+        return VLC_EGENERIC;
     }
 
     /* Initialisations */




More information about the vlc-devel mailing list