diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-27 18:51:24 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-09-21 12:26:36 +0200 |
commit | 793a3563fabcd823ee13cd8e6e1e0f17204f870a (patch) | |
tree | fe927228902b0188bb76dacf5fc4e3be60e5d351 /gst/rawparse | |
parent | f6014febc0f6c3c5b64e3bdb9514bc1026302c96 (diff) | |
download | gstreamer-plugins-bad-793a3563fabcd823ee13cd8e6e1e0f17204f870a.tar.gz |
rawparse: Don't use GST_FLOW_IS_FATAL()
Diffstat (limited to 'gst/rawparse')
-rw-r--r-- | gst/rawparse/gstrawparse.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/gst/rawparse/gstrawparse.c b/gst/rawparse/gstrawparse.c index 07e42c285..004d190b4 100644 --- a/gst/rawparse/gstrawparse.c +++ b/gst/rawparse/gstrawparse.c @@ -406,29 +406,27 @@ pause: GST_LOG_OBJECT (rp, "pausing task, reason %s", reason); gst_pad_pause_task (rp->sinkpad); - if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { - if (ret == GST_FLOW_UNEXPECTED) { - if (rp->segment.flags & GST_SEEK_FLAG_SEGMENT) { - GstClockTime stop; - - GST_LOG_OBJECT (rp, "Sending segment done"); - - if ((stop = rp->segment.stop) == -1) - stop = rp->segment.duration; - - gst_element_post_message (GST_ELEMENT_CAST (rp), - gst_message_new_segment_done (GST_OBJECT_CAST (rp), - rp->segment.format, stop)); - } else { - GST_LOG_OBJECT (rp, "Sending EOS, at end of stream"); - gst_pad_push_event (rp->srcpad, gst_event_new_eos ()); - } + if (ret == GST_FLOW_UNEXPECTED) { + if (rp->segment.flags & GST_SEEK_FLAG_SEGMENT) { + GstClockTime stop; + + GST_LOG_OBJECT (rp, "Sending segment done"); + + if ((stop = rp->segment.stop) == -1) + stop = rp->segment.duration; + + gst_element_post_message (GST_ELEMENT_CAST (rp), + gst_message_new_segment_done (GST_OBJECT_CAST (rp), + rp->segment.format, stop)); } else { - GST_ELEMENT_ERROR (rp, STREAM, FAILED, - ("Internal data stream error."), - ("stream stopped, reason %s", reason)); + GST_LOG_OBJECT (rp, "Sending EOS, at end of stream"); gst_pad_push_event (rp->srcpad, gst_event_new_eos ()); } + } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) { + GST_ELEMENT_ERROR (rp, STREAM, FAILED, + ("Internal data stream error."), + ("stream stopped, reason %s", reason)); + gst_pad_push_event (rp->srcpad, gst_event_new_eos ()); } return; } |