mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
ext/alsa/gstalsa.c: Only set hardware parameters *after* negotiation. Before negotiation, it will set ANY and that se...
Original commit message from CVS: * 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).
This commit is contained in:
parent
f04b458d87
commit
05b7b2845b
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
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):
|
||||
|
|
|
@ -1100,9 +1100,6 @@ gst_alsa_change_state (GstElement * element)
|
|||
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;
|
||||
|
@ -1113,8 +1110,14 @@ gst_alsa_change_state (GstElement * element)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue