[vlc-commits] oss: fix dangling descriptor value (refs #10772)

Rémi Denis-Courmont git at videolan.org
Mon Feb 24 17:45:09 CET 2014


vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 24 18:44:06 2014 +0200| [dcdad4b6a0e6b445fc01f23ce2335d3444d50675] | committer: Rémi Denis-Courmont

oss: fix dangling descriptor value (refs #10772)

(cherry picked from commit 52a59eb4b29d985faf9987dba5360627d6ca2743)

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

 modules/audio_output/oss.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index 940718f..1009eed 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -101,7 +101,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
         msg_Err (aout, "cannot open OSS device %s: %m", device);
         return VLC_EGENERIC;
     }
-    sys->fd = fd;
     msg_Dbg (aout, "using OSS device: %s", device);
 
     /* Select audio format */
@@ -210,6 +209,7 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
     }
     aout_FormatPrepare (fmt);
 
+    sys->fd = fd;
     VolumeSync (aout);
     sys->starting = true;
     sys->format = *fmt;



More information about the vlc-commits mailing list