diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-26 23:39:06 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-27 16:59:09 +0200 |
commit | 2e6f80bf8120628be1f8a7d0181ba3999689a251 (patch) | |
tree | 7837f8e23419725708a58bbaca82207fda8d5d9c | |
parent | 2dfb0d2772eec352eac20656b7e12f626eb50c76 (diff) |
elements: Stop using GST_FLOW_IS_FATAL()
-rw-r--r-- | plugins/elements/gstmultiqueue.c | 2 | ||||
-rw-r--r-- | plugins/elements/gstqueue.c | 3 | ||||
-rw-r--r-- | plugins/elements/gstqueue2.c | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index b9fa663e7f..d9bbba9560 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1120,13 +1120,13 @@ out_flushing: wake_up_next_non_linked (mq); GST_MULTI_QUEUE_MUTEX_UNLOCK (mq); /* upstream needs to see fatal result ASAP to shut things down, * but might be stuck in one of our other full queues; * so empty this one and trigger dynamic queue growth */ - if (GST_FLOW_IS_FATAL (sq->srcresult)) { + if (sq->srcresult <= GST_FLOW_UNEXPECTED) { gst_data_queue_flush (sq->queue); single_queue_underrun_cb (sq->queue, sq); } gst_data_queue_set_flushing (sq->queue, TRUE); gst_pad_pause_task (sq->srcpad); GST_CAT_LOG_OBJECT (multi_queue_debug, mq, diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 0306b04902..34d08ed5ef 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -1231,14 +1231,13 @@ out_flushing: GST_CAT_LOG_OBJECT (queue_dataflow, queue, "pause task, reason: %s", gst_flow_get_name (ret)); GST_QUEUE_SIGNAL_DEL (queue); GST_QUEUE_MUTEX_UNLOCK (queue); /* let app know about us giving up if upstream is not expected to do so */ /* UNEXPECTED is already taken care of elsewhere */ - if (eos && (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) && - (ret != GST_FLOW_UNEXPECTED)) { + if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED)) { GST_ELEMENT_ERROR (queue, STREAM, FAILED, (_("Internal data flow error.")), ("streaming task paused, reason %s (%d)", gst_flow_get_name (ret), ret)); gst_pad_push_event (queue->srcpad, gst_event_new_eos ()); } diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index c56f887cc0..bb09e5a0a2 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -2300,14 +2300,13 @@ out_flushing: gst_pad_pause_task (queue->srcpad); GST_CAT_LOG_OBJECT (queue_dataflow, queue, "pause task, reason: %s", gst_flow_get_name (queue->srcresult)); GST_QUEUE2_MUTEX_UNLOCK (queue); /* let app know about us giving up if upstream is not expected to do so */ /* UNEXPECTED is already taken care of elsewhere */ - if (eos && (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) && - (ret != GST_FLOW_UNEXPECTED)) { + if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED)) { GST_ELEMENT_ERROR (queue, STREAM, FAILED, (_("Internal data flow error.")), ("streaming task paused, reason %s (%d)", gst_flow_get_name (ret), ret)); gst_pad_push_event (queue->srcpad, gst_event_new_eos ()); } @@ -2681,13 +2680,13 @@ gst_queue2_src_activate_pull (GstPad * pad, gboolean active) if (!QUEUE_IS_USING_QUEUE (queue)) { if (QUEUE_IS_USING_TEMP_FILE (queue)) { /* open the temp file now */ result = gst_queue2_open_temp_location_file (queue); } else if (!queue->ring_buffer) { queue->ring_buffer = g_malloc (queue->ring_buffer_max_size); - result = !!queue->ring_buffer; + result = ! !queue->ring_buffer; } else { result = TRUE; } GST_QUEUE2_MUTEX_LOCK (queue); GST_DEBUG_OBJECT (queue, "activating pull mode"); @@ -2884,13 +2883,13 @@ gst_queue2_set_property (GObject * object, break; case PROP_TEMP_REMOVE: queue->temp_remove = g_value_get_boolean (value); break; case PROP_RING_BUFFER_MAX_SIZE: queue->ring_buffer_max_size = g_value_get_uint64 (value); - queue->use_ring_buffer = !!queue->ring_buffer_max_size; + queue->use_ring_buffer = ! !queue->ring_buffer_max_size; break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } |