mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
fix for caps api changes
This commit is contained in:
parent
b65fe71cba
commit
124a33dc95
2 changed files with 9 additions and 6 deletions
|
@ -852,14 +852,16 @@ gst_dtmf_src_negotiate (GstBaseSrc * basesrc)
|
|||
caps = gst_pad_get_allowed_caps (GST_BASE_SRC_PAD (basesrc));
|
||||
|
||||
if (!caps)
|
||||
caps =
|
||||
gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD
|
||||
(basesrc)));
|
||||
caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (basesrc));
|
||||
|
||||
if (gst_caps_is_empty (caps))
|
||||
if (gst_caps_is_empty (caps)) {
|
||||
gst_caps_unref (caps);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gst_caps_truncate (caps);
|
||||
caps = gst_caps_truncate (caps);
|
||||
|
||||
caps = gst_caps_make_writable (caps);
|
||||
s = gst_caps_get_structure (caps, 0);
|
||||
|
||||
gst_structure_fixate_field_nearest_int (s, "rate", DEFAULT_SAMPLE_RATE);
|
||||
|
|
|
@ -904,7 +904,8 @@ gst_rtp_dtmf_src_negotiate (GstBaseSrc * basesrc)
|
|||
}
|
||||
|
||||
/* now fixate, start by taking the first caps */
|
||||
gst_caps_truncate (temp);
|
||||
temp = gst_caps_truncate (temp);
|
||||
temp = gst_caps_make_writable (temp);
|
||||
srccaps = temp;
|
||||
|
||||
/* get first structure */
|
||||
|
|
Loading…
Reference in a new issue