diff options
author | Arun Raghavan <arunsr@codeaurora.org> | 2019-02-06 14:43:18 +0530 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-06 23:43:07 +0200 |
commit | 4a8fa449e667ba32d60df77f3d90114256386ba0 (patch) | |
tree | 01269a6a092140fda574109a41d998fd9f01fec0 | |
parent | 44dcc1d08d127014aaca645d37ad15e642a98395 (diff) | |
download | gstreamer-plugins-good-4a8fa449e667ba32d60df77f3d90114256386ba0.tar.gz |
pulsesink: Deal with not being able to convert a format to caps
It is possible that PulseAudio adds formats that are not yet supported
in pulsesink, and in those cases, we want to gracefully skip them rather
than cause an assert on a NULL caps.
-rw-r--r-- | ext/pulse/pulsesink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index 521c4a602..5758b5514 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -2182,8 +2182,9 @@ gst_pulsesink_query_getcaps (GstPulseSink * psink, GstCaps * filter) } for (i = g_list_first (device_info.formats); i; i = g_list_next (i)) { - gst_caps_append (ret, - gst_pulse_format_info_to_caps ((pa_format_info *) i->data)); + GstCaps *caps = gst_pulse_format_info_to_caps ((pa_format_info *) i->data); + if (caps) + gst_caps_append (ret, caps); } unlock: |