[MOVED FROM GST-P-FARSIGHT] Fix object locking in setcaps

20080428234948-4f0f6-4586434b4308e114f495e926996fc19483c1056f.gz
This commit is contained in:
Youness Alaoui 2008-04-28 23:49:48 +00:00 committed by Edward Hervey
parent 806f8e05c6
commit b4ac5eabc9

View file

@ -359,7 +359,6 @@ gst_live_adder_setcaps (GstPad * pad, GstCaps * caps)
pads = g_list_next (pads);
}
GST_OBJECT_UNLOCK (adder);
/* parse caps now */
structure = gst_caps_get_structure (caps, 0);
@ -415,11 +414,13 @@ gst_live_adder_setcaps (GstPad * pad, GstCaps * caps)
/* precalc bps */
adder->bps = (adder->width / 8) * adder->channels;
GST_OBJECT_UNLOCK (adder);
return TRUE;
/* ERRORS */
not_supported:
{
GST_OBJECT_UNLOCK (adder);
GST_DEBUG_OBJECT (adder, "unsupported format set as caps");
return FALSE;
}