summaryrefslogtreecommitdiff
path: root/ext/ldac
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2020-12-11 14:52:20 -0500
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-04-07 21:14:50 +0000
commit98bd83484cb1f0c920da57acf2c7b661dd1ec2af (patch)
tree966319bc0079b8d33d605135011ee3eb0ddc58f5 /ext/ldac
parent50e116c4a780ef9a0f7836867b3addf79bceb380 (diff)
downloadgstreamer-plugins-bad-98bd83484cb1f0c920da57acf2c7b661dd1ec2af.tar.gz
sbc/ldac: Don't use GST_CAPS_NONE to mean NULL
The GST_CAPS_NONE macro actually returns a instance of a empty caps. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1874>
Diffstat (limited to 'ext/ldac')
-rw-r--r--ext/ldac/gstldacenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ldac/gstldacenc.c b/ext/ldac/gstldacenc.c
index 1820d3ab0..ec4c04fb2 100644
--- a/ext/ldac/gstldacenc.c
+++ b/ext/ldac/gstldacenc.c
@@ -197,11 +197,11 @@ gst_ldac_enc_do_negotiate (GstAudioEncoder * audio_enc)
/* Negotiate output format based on downstream caps restrictions */
caps = gst_pad_get_allowed_caps (GST_AUDIO_ENCODER_SRC_PAD (enc));
- if (caps == GST_CAPS_NONE || gst_caps_is_empty (caps))
- goto failure;
if (caps == NULL)
caps = gst_static_pad_template_get_caps (&ldac_enc_src_factory);
+ else if (gst_caps_is_empty (caps))
+ goto failure;
/* Fixate output caps */
filter_caps = gst_caps_new_simple ("audio/x-ldac", "rate", G_TYPE_INT,