diff options
author | Ilya Konstantinov <ilya.konstantinov@gmail.com> | 2015-02-21 14:41:08 +0200 |
---|---|---|
committer | Arun Raghavan <git@arunraghavan.net> | 2015-03-03 23:26:58 +0530 |
commit | fd25ef137edf845bc87d1827b507798f87e96363 (patch) | |
tree | 5fada22b3068dfa5e1cd401a21d642c32ec2059a /sys/osxaudio | |
parent | 8cd40e77b70dae2a7b76f41c47a753a526d4da49 (diff) | |
download | gstreamer-plugins-good-fd25ef137edf845bc87d1827b507798f87e96363.tar.gz |
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
Diffstat (limited to 'sys/osxaudio')
-rw-r--r-- | sys/osxaudio/gstosxaudiosink.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/osxaudio/gstosxaudiosink.c b/sys/osxaudio/gstosxaudiosink.c index bd373faa6..23f0982a0 100644 --- a/sys/osxaudio/gstosxaudiosink.c +++ b/sys/osxaudio/gstosxaudiosink.c @@ -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); |