mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
osxaudiosink: Allow renegotiating caps
Once osxaudiosink's device is open, it fixates on the initial caps and refuses to accept new caps. This is erroneous since the Audio Unit is can accept a new ASBD, and GstAudioRingBuffer supports reconfiguration as well. https://bugzilla.gnome.org/show_bug.cgi?id=743925
This commit is contained in:
parent
8cd40e77b7
commit
fd25ef137e
1 changed files with 6 additions and 8 deletions
|
@ -363,17 +363,12 @@ gst_osx_audio_sink_getcaps (GstBaseSink * sink, GstCaps * filter)
|
|||
if (buf) {
|
||||
GST_OBJECT_LOCK (buf);
|
||||
|
||||
if (buf->acquired && buf->spec.caps) {
|
||||
/* Caps are fixed, use what we have */
|
||||
ret = gst_caps_ref (buf->spec.caps);
|
||||
}
|
||||
|
||||
if (!ret && buf->open && !osxsink->cached_caps) {
|
||||
if (buf->open && !osxsink->cached_caps) {
|
||||
/* Device is open, let's probe its caps */
|
||||
gst_osx_audio_sink_probe_caps (osxsink);
|
||||
}
|
||||
|
||||
if (!ret && osxsink->cached_caps)
|
||||
if (osxsink->cached_caps)
|
||||
ret = gst_caps_ref (osxsink->cached_caps);
|
||||
|
||||
GST_OBJECT_UNLOCK (buf);
|
||||
|
@ -381,7 +376,10 @@ gst_osx_audio_sink_getcaps (GstBaseSink * sink, GstCaps * filter)
|
|||
gst_object_unref (buf);
|
||||
}
|
||||
|
||||
if (ret && filter) {
|
||||
if (!ret)
|
||||
ret = gst_pad_get_pad_template_caps (GST_AUDIO_BASE_SINK_PAD (osxsink));
|
||||
|
||||
if (filter) {
|
||||
GstCaps *tmp;
|
||||
tmp = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (ret);
|
||||
|
|
Loading…
Reference in a new issue