From: Jan Schmidt Date: Sat, 8 Dec 2007 16:47:33 +0000 (+0000) Subject: sys/oss/gstosshelper.c: Verify that the format returned after the ioctl is the one... X-Git-Tag: RELEASE-0_10_7~147 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fed0fc44d4a0868fb36008ced2a42475dd75e41b;p=platform%2Fupstream%2Fgst-plugins-good.git 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. --- diff --git a/ChangeLog b/ChangeLog index cff07bd..1d90d50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-08 Jan Schmidt + + * 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 * sys/oss/gstossaudio.c: (plugin_init): diff --git a/sys/oss/gstosshelper.c b/sys/oss/gstosshelper.c index 38b3689..dea22cc 100644 --- a/sys/oss/gstosshelper.c +++ b/sys/oss/gstosshelper.c @@ -352,7 +352,7 @@ gst_oss_helper_rate_check_rate (GstOssProbe * probe, int irate) GST_LOG ("checking format %d, channels %d, rate %d", format, n_channels, rate); ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format); - if (ret < 0) + if (ret < 0 || format != probe->format) return -1; ret = ioctl (probe->fd, SNDCTL_DSP_CHANNELS, &n_channels); if (ret < 0)