summaryrefslogtreecommitdiff
path: root/sys/osxaudio
diff options
context:
space:
mode:
authorArun Raghavan <arun@centricular.com>2015-03-03 18:39:15 +0530
committerArun Raghavan <git@arunraghavan.net>2015-03-03 23:26:58 +0530
commit995ba701b70d0161f4b4e34cb233d741bae2f492 (patch)
treee559a477e5c1283ee884876d061a58aa87fef5f1 /sys/osxaudio
parentfd25ef137edf845bc87d1827b507798f87e96363 (diff)
downloadgstreamer-plugins-good-995ba701b70d0161f4b4e34cb233d741bae2f492.tar.gz
osxaudiosrc: Allow caps renegotiation
The ringbuffer does allow renegotiation, so we do not have to report fixed caps once it is acquired (based on a similar patch for the sink side by Ilya Konstantinov <ilya.konstantinov@gmail.com>).
Diffstat (limited to 'sys/osxaudio')
-rw-r--r--sys/osxaudio/gstosxaudiosrc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/osxaudio/gstosxaudiosrc.c b/sys/osxaudio/gstosxaudiosrc.c
index dea94012f..8b98dc270 100644
--- a/sys/osxaudio/gstosxaudiosrc.c
+++ b/sys/osxaudio/gstosxaudiosrc.c
@@ -318,12 +318,7 @@ gst_osx_audio_src_get_caps (GstBaseSrc * src, 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 && !osxsrc->cached_caps) {
+ if (buf->open && !osxsrc->cached_caps) {
/* Device is open, let's probe its caps */
gst_osx_audio_src_probe_caps (osxsrc);
}
@@ -332,8 +327,10 @@ gst_osx_audio_src_get_caps (GstBaseSrc * src, GstCaps * filter)
gst_object_unref (buf);
}
- if (!ret && osxsrc->cached_caps)
+ if (osxsrc->cached_caps)
ret = gst_caps_ref (osxsrc->cached_caps);
+ else
+ ret = gst_pad_get_pad_template_caps (GST_AUDIO_BASE_SRC_PAD (osxsrc));
if (filter) {
GstCaps *tmp;