gst/adder/gstadder.c: properly error out when no negotiation has happened yet. (fixes #143032)

Original commit message from CVS:
reviewed by Benjamin Otte  <otte@gnome.org>
* gst/adder/gstadder.c: (gst_adder_loop):
properly error out when no negotiation has happened yet. (fixes
#143032)
This commit is contained in:
Benjamin Otte 2004-06-06 23:43:15 +00:00
parent 77586eea92
commit 5b6ffe42de
2 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2004-06-07 Tim-Philipp Müller <t.i.m@zen.co.uk>
reviewed by Benjamin Otte <otte@gnome.org>
* gst/adder/gstadder.c: (gst_adder_loop):
properly error out when no negotiation has happened yet. (fixes
#143032)
2004-06-06 Benjamin Otte <otte@gnome.org>
* ext/mad/gstid3tag.c: (gst_id3_tag_handle_event):

View file

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