vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Tue Dec 18 
22:36:24 2012 +0200| [1c15f75ee8a783c68be5db84029b1ddfb1825207] | committer: 
Rémi Denis-Courmont

OSS: trivial fixes

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

 modules/audio_output/oss.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index e3c77ef..c020ff8 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -223,7 +223,7 @@ static int Start (audio_output_t *aout, 
audio_sample_format_t *restrict fmt)
         fmt->i_physical_channels = channels;
     }
 
-    VolumeSync (aout):
+    VolumeSync (aout);
     sys->starting = true;
     sys->format = *fmt;
     return VLC_SUCCESS;
@@ -332,6 +332,8 @@ static int VolumeSet (audio_output_t *aout, float vol)
 {
     aout_sys_t *sys = aout->sys;
     int fd = sys->fd;
+    if (fd == -1)
+        return -1;
 
     int level = lroundf (vol * 100.f);
     if (level > 0xFF)
@@ -353,6 +355,8 @@ static int MuteSet (audio_output_t *aout, bool mute)
 {
     aout_sys_t *sys = aout->sys;
     int fd = sys->fd;
+    if (fd == -1)
+        return -1;
 
     int level = mute ? 0 : (sys->level | (sys->level << 8));
     if (ioctl (fd, SNDCTL_DSP_SETPLAYVOL, &level) < 0)

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to