diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-27 18:23:19 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-27 18:23:19 +0000 |
commit | 4c211d8851d21b05af89c81375784970348da80b (patch) | |
tree | 46b1d18823a213fdbf034c66227cf4e73cd4deea /libao2 | |
parent | 882ce0cd5e26f1b8d4360ba2a390670cc1f4ca6b (diff) |
Declare variable closer to where it is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30444 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_alsa.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index c46e3a0d41..dd99d348b6 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -315,7 +315,6 @@ static int init(int rate_hz, int channels, int format, int flags) { unsigned int alsa_buffer_time = 500000; /* 0.5 s */ unsigned int alsa_fragcount = 16; - int open_mode; int err; int block; strarg_t device; @@ -469,15 +468,8 @@ static int init(int rate_hz, int channels, int format, int flags) mp_msg(MSGT_AO,MSGL_V,"alsa-init: using device %s\n", alsa_device); - //setting modes for block or nonblock-mode - if (!block) { - open_mode = SND_PCM_NONBLOCK; - } - else { - open_mode = 0; - } - if (!alsa_handler) { + int open_mode = block ? 0 : SND_PCM_NONBLOCK; int isac3 = AF_FORMAT_IS_AC3(format); //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) |