OSDN Git Service
(root)
/
android-x86
/
external-alsa-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8551fe2
)
pcm: Don't assert in _snd_pcm_hw_params_internal()
author
Takashi Iwai
<tiwai@suse.de>
Mon, 1 Jun 2015 11:45:01 +0000
(13:45 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 1 Jun 2015 11:46:40 +0000
(13:46 +0200)
It's no fatal error from sw params, and it's really bad habit to use
assert() and abort the operation as a system library.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_params.c
patch
|
blob
|
history
diff --git
a/src/pcm/pcm_params.c
b/src/pcm/pcm_params.c
index
1d667a5
..
60d99ad
100644
(file)
--- a/
src/pcm/pcm_params.c
+++ b/
src/pcm/pcm_params.c
@@
-2361,7
+2361,8
@@
int _snd_pcm_hw_params_internal(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
memset(&sw, 0, sizeof(sw));
snd_pcm_sw_params_default(pcm, &sw);
err = snd_pcm_sw_params(pcm, &sw);
- assert(err >= 0);
+ if (err < 0)
+ return err;
if (pcm->mmap_rw ||
pcm->access == SND_PCM_ACCESS_MMAP_INTERLEAVED ||