queue2: Remove redundant variable

Other than saving an immense amount of 4 bytes of memory this
prevents clang from complaining and keeps the ring buffer state
in a single variable instead of two.
This commit is contained in:
Sebastian Dröge 2010-10-31 18:23:00 +01:00
parent 7199a4f1ff
commit e554c7a1f6
2 changed files with 1 additions and 4 deletions

View file

@ -98,7 +98,7 @@ enum
/* other defines */
#define DEFAULT_BUFFER_SIZE 4096
#define QUEUE_IS_USING_TEMP_FILE(queue) ((queue)->temp_location_set || (queue)->temp_template != NULL)
#define QUEUE_IS_USING_RING_BUFFER(queue) ((queue)->use_ring_buffer) /* for consistency with the above macro */
#define QUEUE_IS_USING_RING_BUFFER(queue) ((queue)->ring_buffer_max_size != 0) /* for consistency with the above macro */
#define QUEUE_IS_USING_QUEUE(queue) (!QUEUE_IS_USING_TEMP_FILE(queue) && !QUEUE_IS_USING_RING_BUFFER (queue))
#define QUEUE_MAX_BYTES(queue) MIN((queue)->max_level.bytes, (queue)->ring_buffer_max_size)
@ -453,7 +453,6 @@ gst_queue2_init (GstQueue2 * queue, GstQueue2Class * g_class)
queue->temp_location_set = FALSE;
queue->temp_remove = DEFAULT_TEMP_REMOVE;
queue->use_ring_buffer = FALSE;
queue->ring_buffer = NULL;
queue->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE;
@ -2961,7 +2960,6 @@ 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;
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);

View file

@ -138,7 +138,6 @@ struct _GstQueue2
gboolean segment_event_received;
GstEvent *starting_segment;
gboolean use_ring_buffer;
guint64 ring_buffer_max_size;
guint8 * ring_buffer;
};