avoid SIGFPE, throw error

Original commit message from CVS:
avoid SIGFPE, throw error
This commit is contained in:
Thomas Vander Stichele 2004-04-01 11:40:45 +00:00
parent 195d892034
commit a4c1edf3cb
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2004-04-01 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/adder/gstadder.c: (gst_adder_get_type), (gst_adder_loop):
throw errors instead of allowing SIGFPE
2004-04-01 Thomas Vander Stichele <thomas at apestaart dot org>
* gst-libs/gst/gconf/gconf.c: (gst_gconf_get_string),

View file

@ -454,6 +454,12 @@ gst_adder_loop (GstElement * element)
GST_LOG ("done copying data");
}
}
if (adder->width == 0)
GST_ELEMENT_ERROR (adder, CORE, NEGOTIATION, (NULL), ("width is 0"));
if (adder->channels == 0)
GST_ELEMENT_ERROR (adder, CORE, NEGOTIATION, (NULL), ("channels is 0"));
if (adder->rate == 0)
GST_ELEMENT_ERROR (adder, CORE, NEGOTIATION, (NULL), ("rate is 0"));
GST_BUFFER_TIMESTAMP (buf_out) = adder->timestamp;
if (adder->format == GST_ADDER_FORMAT_FLOAT)