elements: Stop using GST_FLOW_IS_FATAL()

This commit is contained in:
Sebastian Dröge 2010-08-26 23:39:06 +02:00
parent 2dfb0d2772
commit 2e6f80bf81
3 changed files with 5 additions and 7 deletions

View file

@ -1123,7 +1123,7 @@ out_flushing:
/* 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);
}

View file

@ -1234,8 +1234,7 @@ out_flushing:
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)",

View file

@ -2303,8 +2303,7 @@ out_flushing:
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)",
@ -2684,7 +2683,7 @@ gst_queue2_src_activate_pull (GstPad * pad, gboolean active)
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;
}
@ -2887,7 +2886,7 @@ gst_queue2_set_property (GObject * object,
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);