diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-27 18:32:33 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-09-21 12:25:53 +0200 |
commit | f2affc667f3d64534dac6e1bcb3e19273e76519a (patch) | |
tree | 555c607926f1814bb92dc35ae020d90b04ac9332 /gst/aiff | |
parent | 30ff1ea346610a6a6b43e23188575db3c67014d5 (diff) |
aiffparse: Don't use GST_FLOW_IS_FATAL()
Diffstat (limited to 'gst/aiff')
-rw-r--r-- | gst/aiff/aiffparse.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c index 7f0a75092..c5eafa030 100644 --- a/gst/aiff/aiffparse.c +++ b/gst/aiff/aiffparse.c @@ -1247,29 +1247,27 @@ pause: aiff->segment_running = FALSE; gst_pad_pause_task (pad); - if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { - if (ret == GST_FLOW_UNEXPECTED) { - /* perform EOS logic */ - if (aiff->segment.flags & GST_SEEK_FLAG_SEGMENT) { - GstClockTime stop; - - if ((stop = aiff->segment.stop) == -1) - stop = aiff->segment.duration; - - gst_element_post_message (GST_ELEMENT_CAST (aiff), - gst_message_new_segment_done (GST_OBJECT_CAST (aiff), - aiff->segment.format, stop)); - } else { - gst_pad_push_event (aiff->srcpad, gst_event_new_eos ()); - } + if (ret == GST_FLOW_UNEXPECTED) { + /* perform EOS logic */ + if (aiff->segment.flags & GST_SEEK_FLAG_SEGMENT) { + GstClockTime stop; + + if ((stop = aiff->segment.stop) == -1) + stop = aiff->segment.duration; + + gst_element_post_message (GST_ELEMENT_CAST (aiff), + gst_message_new_segment_done (GST_OBJECT_CAST (aiff), + aiff->segment.format, stop)); } else { - /* for fatal errors we post an error message, post the error - * first so the app knows about the error first. */ - GST_ELEMENT_ERROR (aiff, STREAM, FAILED, - (_("Internal data flow error.")), - ("streaming task paused, reason %s (%d)", reason, ret)); gst_pad_push_event (aiff->srcpad, gst_event_new_eos ()); } + } else if (ret < GST_FLOW_UNEXPECTED || ret == GST_FLOW_NOT_LINKED) { + /* for fatal errors we post an error message, post the error + * first so the app knows about the error first. */ + GST_ELEMENT_ERROR (aiff, STREAM, FAILED, + (_("Internal data flow error.")), + ("streaming task paused, reason %s (%d)", reason, ret)); + gst_pad_push_event (aiff->srcpad, gst_event_new_eos ()); } return; } |