basesrc: Don't ignore the return value of gst_pad_set_caps() and call it after the vfunc

This commit is contained in:
Sebastian Dröge 2012-06-08 15:41:17 +02:00
parent ec7a0a7cf2
commit aee0d2a2b3

View file

@ -866,10 +866,11 @@ gst_base_src_set_caps (GstBaseSrc * src, GstCaps * caps)
bclass = GST_BASE_SRC_GET_CLASS (src); bclass = GST_BASE_SRC_GET_CLASS (src);
gst_base_src_send_stream_start (src); gst_base_src_send_stream_start (src);
gst_pad_push_event (src->srcpad, gst_event_new_caps (caps));
if (bclass->set_caps) if (bclass->set_caps)
res = bclass->set_caps (src, caps); res = bclass->set_caps (src, caps);
if (res)
res = gst_pad_set_caps (src->srcpad, caps);
return res; return res;
} }