[vlc-devel] commit: oss: don't forget some "close". ( Rémi Duraffort )

git version control git at videolan.org
Wed Mar 25 14:14:30 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Mar 25 13:34:47 2009 +0100| [7e66b53bb5978507c384712b450ade50b8bf7a59] | committer: Rémi Duraffort 

oss: don't forget some "close".

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

 modules/audio_output/oss.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index 4c88224..0948e27 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -321,6 +321,7 @@ static int Open( vlc_object_t *p_this )
     if ( var_Get( p_aout, "audio-device", &val ) < 0 )
     {
         /* Probe() has failed. */
+        close( p_sys->i_fd );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -359,12 +360,12 @@ static int Open( vlc_object_t *p_this )
     {
         /* This should not happen ! */
         msg_Err( p_aout, "internal: can't find audio-device (%i)", val.i_int );
+        close( p_sys->i_fd );
         free( p_sys );
         return VLC_EGENERIC;
     }
 
-    val.b_bool = true;
-    var_Set( p_aout, "intf-change", val );
+    var_SetBool( p_aout, "intf-change", true );
 
     /* Reset the DSP device */
     if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )




More information about the vlc-devel mailing list