[MPlayer-cvslog] r30444 - trunk/libao2/ao_alsa.c
reimar
subversion at mplayerhq.hu
Wed Jan 27 19:23:19 CET 2010
Author: reimar
Date: Wed Jan 27 19:23:19 2010
New Revision: 30444
Log:
Declare variable closer to where it is used.
Modified:
trunk/libao2/ao_alsa.c
Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c Wed Jan 27 19:21:27 2010 (r30443)
+++ trunk/libao2/ao_alsa.c Wed Jan 27 19:23:19 2010 (r30444)
@@ -315,7 +315,6 @@ static int init(int rate_hz, int channel
{
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 channel
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)
More information about the MPlayer-cvslog
mailing list