xvidenc: Always return reffed caps from _getcaps

Not returning ref caps will leads to crashes and refcounting issues in
upstream elements
This commit is contained in:
Sjoerd Simons 2011-05-03 15:47:02 +01:00
parent 851e9b1f8d
commit 5ebff49162

View file

@ -806,7 +806,7 @@ gst_xvidenc_getcaps (GstPad * pad)
/* If we already have caps return them */ /* If we already have caps return them */
if (GST_PAD_CAPS (pad)) if (GST_PAD_CAPS (pad))
return GST_PAD_CAPS (pad); return gst_caps_ref (GST_PAD_CAPS (pad));
xvidenc = GST_XVIDENC (gst_pad_get_parent (pad)); xvidenc = GST_XVIDENC (gst_pad_get_parent (pad));
if (!xvidenc) if (!xvidenc)