Original commit message from CVS:
Properly reset the internal state without leaking the filehandle
common->device = g_strdup ("/dev/dsp");
common->fd = -1;
+ gst_osscommon_reset (common);
+}
+
+void
+gst_osscommon_reset (GstOssCommon *common)
+{
common->law = 0;
common->endianness = G_BYTE_ORDER;
common->sign = TRUE;
};
void gst_osscommon_init (GstOssCommon *common);
+void gst_osscommon_reset (GstOssCommon *common);
gboolean gst_osscommon_open_audio (GstOssCommon *common,
GstOssOpenMode mode, gchar **error);
case GST_STATE_PAUSED_TO_READY:
if (GST_FLAG_IS_SET (element, GST_OSSSINK_OPEN))
ioctl (osssink->common.fd, SNDCTL_DSP_RESET, 0);
- gst_osscommon_init (&osssink->common);
+ gst_osscommon_reset (&osssink->common);
break;
case GST_STATE_READY_TO_NULL:
if (GST_FLAG_IS_SET (element, GST_OSSSINK_OPEN)) {