mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
sys/oss/gstosshelper.c: Verify that the format returned after the ioctl is the one we requested. It is valid for the ...
Original commit message from CVS: * sys/oss/gstosshelper.c: Verify that the format returned after the ioctl is the one we requested. It is valid for the ioctl to succeed while substituting an alternate 'supported' sample format.
This commit is contained in:
parent
915732f5b5
commit
fed0fc44d4
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-12-08 Jan Schmidt <jan.schmidt@sun.com>
|
||||||
|
|
||||||
|
* sys/oss/gstosshelper.c:
|
||||||
|
Verify that the format returned after the ioctl is the one
|
||||||
|
we requested. It is valid for the ioctl to succeed while
|
||||||
|
substituting an alternate 'supported' sample format.
|
||||||
|
|
||||||
2007-12-07 Tim-Philipp Müller <tim at centricular dot net>
|
2007-12-07 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* sys/oss/gstossaudio.c: (plugin_init):
|
* sys/oss/gstossaudio.c: (plugin_init):
|
||||||
|
|
|
@ -352,7 +352,7 @@ gst_oss_helper_rate_check_rate (GstOssProbe * probe, int irate)
|
||||||
GST_LOG ("checking format %d, channels %d, rate %d",
|
GST_LOG ("checking format %d, channels %d, rate %d",
|
||||||
format, n_channels, rate);
|
format, n_channels, rate);
|
||||||
ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format);
|
ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format);
|
||||||
if (ret < 0)
|
if (ret < 0 || format != probe->format)
|
||||||
return -1;
|
return -1;
|
||||||
ret = ioctl (probe->fd, SNDCTL_DSP_CHANNELS, &n_channels);
|
ret = ioctl (probe->fd, SNDCTL_DSP_CHANNELS, &n_channels);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Reference in a new issue