summaryrefslogtreecommitdiff
path: root/ext/flac/gstflacenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/flac/gstflacenc.c')
-rw-r--r--ext/flac/gstflacenc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c
index dae0172a0..0e3940fa6 100644
--- a/ext/flac/gstflacenc.c
+++ b/ext/flac/gstflacenc.c
@@ -766,9 +766,8 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter)
pad = GST_AUDIO_ENCODER_SINK_PAD (enc);
- if (gst_pad_has_current_caps (pad)) {
- ret = gst_pad_get_current_caps (pad);
- } else {
+ ret = gst_pad_get_current_caps (pad);
+ if (ret == NULL) {
ret = gst_pad_get_pad_template_caps (pad);
}
@@ -1281,9 +1280,8 @@ gst_flac_enc_sink_query (GstAudioEncoder * enc, GstQuery * query)
case GST_QUERY_ACCEPT_CAPS:{
GstCaps *acceptable, *caps;
- if (gst_pad_has_current_caps (pad)) {
- acceptable = gst_pad_get_current_caps (pad);
- } else {
+ acceptable = gst_pad_get_current_caps (pad);
+ if (acceptable == NULL) {
acceptable = gst_pad_get_pad_template_caps (pad);
}