mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
If the card couldn't do duplex when required we would incorrectly return
success from this function with a closed fd. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@451 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
72316ccf9c
commit
f61be8b654
1 changed files with 2 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) {
|
||||||
if (*tcaps & DSP_CAP_DUPLEX)
|
if (*tcaps & DSP_CAP_DUPLEX)
|
||||||
return fd;
|
return fd;
|
||||||
|
|
||||||
close(fd);
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fd = open(device, (*mode = O_WRONLY)|O_NDELAY)) < 0) {
|
if ((fd = open(device, (*mode = O_WRONLY)|O_NDELAY)) < 0) {
|
||||||
|
|
@ -87,7 +87,7 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) {
|
||||||
fail:
|
fail:
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
return fd;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
|
int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue