From e400c8482aa7fce41acdda213e9d0d27bef15b45 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 26 Oct 2010 15:44:37 -0300 Subject: [PATCH] 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 --- gst/goom/gstgoom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 2ae669cd4c..30a6c8ce66 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -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 */