fix for caps api changes

This commit is contained in:
Wim Taymans 2012-03-11 19:06:59 +01:00
parent b65fe71cba
commit 124a33dc95
2 changed files with 9 additions and 6 deletions

View file

@ -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);

View file

@ -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 */