goom: Return not-negotiated when bps is unknown

If caps weren't negotiated, goom should return not-negotiated
from its chain functions instead of using bps unitialized, which
leads to a division by 0

https://bugzilla.gnome.org/show_bug.cgi?id=633212
This commit is contained in:
Thiago Santos 2010-10-26 15:44:37 -03:00
parent e530cc352c
commit e400c8482a

View file

@ -485,6 +485,10 @@ gst_goom_chain (GstPad * pad, GstBuffer * buffer)
GstBuffer *outbuf = NULL;
goom = GST_GOOM (gst_pad_get_parent (pad));
if (goom->bps == 0) {
ret = GST_FLOW_NOT_NEGOTIATED;
goto beach;
}
/* If we don't have an output format yet, preallocate a buffer to try and
* set one */