+2004-11-11 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * ext/alsa/gstalsa.c: (gst_alsa_change_state):
+ Only set hardware parameters *after* negotiation. Before
+ negotiation, it will set ANY and that seems to cause crashes
+ (see e.g. #151288, #153227).
+
2004-11-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/alsa/gstalsasink.c: (gst_alsa_sink_get_time):
return GST_STATE_FAILURE;
break;
case GST_STATE_READY_TO_PAUSED:
- if (!(GST_FLAG_IS_SET (element, GST_ALSA_RUNNING) ||
- gst_alsa_start_audio (this)))
- return GST_STATE_FAILURE;
this->played = 0;
this->captured = 0;
break;
snd_strerror (err));
return GST_STATE_FAILURE;
}
- } else if (!(GST_FLAG_IS_SET (element, GST_ALSA_RUNNING) ||
- gst_alsa_start_audio (this))) {
+ }
+ /* If we were already negotiated, but we are not running, then
+ * we stopped (probably because we paused), so re-start. If
+ * there's no format, we didn't negotiate yet so don't do
+ * anything because ALSA will crash (#151288, #153227, etc.). */
+ else if (this->format != NULL &&
+ !GST_FLAG_IS_SET (element, GST_ALSA_RUNNING) &&
+ !gst_alsa_start_audio (this)) {
return GST_STATE_FAILURE;
}
gst_alsa_clock_start (this->clock);