gst/base/gstbasesrc.c: Post error messages on errors.

Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_loop):
Post error messages on errors.
This commit is contained in:
Wim Taymans 2005-07-14 18:45:51 +00:00
parent 9ace74670e
commit 40a158fa44
3 changed files with 25 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-07-14 Wim Taymans <wim@fluendo.com>
* gst/base/gstbasesrc.c: (gst_base_src_loop):
Post error messages on errors.
2005-07-14 Wim Taymans <wim@fluendo.com>
* gst/gstcaps.c: (gst_caps_do_simplify):

View file

@ -678,11 +678,20 @@ pause:
{
GST_DEBUG_OBJECT (src, "pausing task");
gst_pad_pause_task (pad);
if (GST_FLOW_IS_FATAL (ret)) {
/* for fatal errors we post an error message */
GST_ELEMENT_ERROR (src, STREAM, STOPPED,
("streaming stopped, reason %d", ret),
("streaming stopped, reason %d", ret));
gst_pad_push_event (pad, gst_event_new (GST_EVENT_EOS));
}
return;
}
error:
{
GST_DEBUG_OBJECT (src, "got error, pausing task");
GST_ELEMENT_ERROR (src, STREAM, STOPPED,
("internal: element returned NULL buffer"),
("internal: element returned NULL buffer"));
gst_pad_pause_task (pad);
gst_pad_push_event (pad, gst_event_new (GST_EVENT_EOS));
return;

View file

@ -678,11 +678,20 @@ pause:
{
GST_DEBUG_OBJECT (src, "pausing task");
gst_pad_pause_task (pad);
if (GST_FLOW_IS_FATAL (ret)) {
/* for fatal errors we post an error message */
GST_ELEMENT_ERROR (src, STREAM, STOPPED,
("streaming stopped, reason %d", ret),
("streaming stopped, reason %d", ret));
gst_pad_push_event (pad, gst_event_new (GST_EVENT_EOS));
}
return;
}
error:
{
GST_DEBUG_OBJECT (src, "got error, pausing task");
GST_ELEMENT_ERROR (src, STREAM, STOPPED,
("internal: element returned NULL buffer"),
("internal: element returned NULL buffer"));
gst_pad_pause_task (pad);
gst_pad_push_event (pad, gst_event_new (GST_EVENT_EOS));
return;