diff options
author | Arun Raghavan <arun@centricular.com> | 2015-03-09 11:24:58 +0530 |
---|---|---|
committer | Arun Raghavan <git@arunraghavan.net> | 2015-03-09 11:55:40 +0530 |
commit | 3751c87f00a613821e9a1b7e9e809ef70960e67b (patch) | |
tree | 6de9b262ddee76edaa50308cc447df146a7bea00 /ext | |
parent | eeb4d2e8b1ca54263086857dd7776960bf7d4941 (diff) | |
download | gstreamer-plugins-good-3751c87f00a613821e9a1b7e9e809ef70960e67b.tar.gz |
pulsesink: Make sure to filter caps in all cases during CAPS query
We were skipping the filter step while returning template caps, for
example.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pulse/pulsesink.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index eda321fce..f7685f71f 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -2142,6 +2142,8 @@ gst_pulsesink_query_getcaps (GstPulseSink * psink, GstCaps * filter) goto unlock; } + ret = gst_caps_new_empty (); + if (pbuf->stream) { /* We're in PAUSED or higher */ stream = pbuf->stream; @@ -2175,8 +2177,6 @@ gst_pulsesink_query_getcaps (GstPulseSink * psink, GstCaps * filter) stream = pbuf->probe_stream; } - ret = gst_caps_new_empty (); - if (!(o = pa_context_get_sink_info_by_name (pbuf->context, pa_stream_get_device_name (stream), gst_pulsesink_sink_info_cb, &device_info))) @@ -2193,6 +2193,11 @@ gst_pulsesink_query_getcaps (GstPulseSink * psink, GstCaps * filter) gst_pulse_format_info_to_caps ((pa_format_info *) i->data)); } +unlock: + pa_threaded_mainloop_unlock (mainloop); + /* FIXME: this could be freed after device_name is got */ + GST_OBJECT_UNLOCK (pbuf); + if (filter) { GstCaps *tmp = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST); @@ -2200,11 +2205,6 @@ gst_pulsesink_query_getcaps (GstPulseSink * psink, GstCaps * filter) ret = tmp; } -unlock: - pa_threaded_mainloop_unlock (mainloop); - /* FIXME: this could be freed after device_name is got */ - GST_OBJECT_UNLOCK (pbuf); - out: free_device_info (&device_info); |