summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/aacparse/gstbaseparse.c14
-rw-r--r--gst/amrparse/gstbaseparse.c14
-rw-r--r--gst/flacparse/gstbaseparse.c14
3 files changed, 15 insertions, 27 deletions
diff --git a/gst/aacparse/gstbaseparse.c b/gst/aacparse/gstbaseparse.c
index baa56826..5f9a949e 100644
--- a/gst/aacparse/gstbaseparse.c
+++ b/gst/aacparse/gstbaseparse.c
@@ -838,7 +838,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
parse = GST_BASE_PARSE (GST_OBJECT_PARENT (pad));
bclass = GST_BASE_PARSE_GET_CLASS (parse);
- if (parse->pending_segment) {
+ if (G_UNLIKELY (parse->pending_segment)) {
GST_DEBUG_OBJECT (parse, "chain pushing a pending segment");
gst_pad_push_event (parse->srcpad, parse->pending_segment);
parse->pending_segment = NULL;
@@ -854,7 +854,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
gst_adapter_clear (parse->adapter);
}
- if (parse->priv->pending_events) {
+ if (G_UNLIKELY (parse->priv->pending_events)) {
GList *l;
for (l = parse->priv->pending_events; l != NULL; l = l->next) {
@@ -864,13 +864,9 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
parse->priv->pending_events = NULL;
}
- if (buffer) {
- GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
- GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
-
-
- gst_adapter_push (parse->adapter, buffer);
- }
+ GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
+ GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
+ gst_adapter_push (parse->adapter, buffer);
/* Parse and push as many frames as possible */
/* Stop either when adapter is empty or we are flushing */
diff --git a/gst/amrparse/gstbaseparse.c b/gst/amrparse/gstbaseparse.c
index dc82472d..4d7b03aa 100644
--- a/gst/amrparse/gstbaseparse.c
+++ b/gst/amrparse/gstbaseparse.c
@@ -838,7 +838,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
parse = GST_BASE_PARSE (GST_OBJECT_PARENT (pad));
bclass = GST_BASE_PARSE_GET_CLASS (parse);
- if (parse->pending_segment) {
+ if (G_UNLIKELY (parse->pending_segment)) {
GST_DEBUG_OBJECT (parse, "chain pushing a pending segment");
gst_pad_push_event (parse->srcpad, parse->pending_segment);
parse->pending_segment = NULL;
@@ -854,7 +854,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
gst_adapter_clear (parse->adapter);
}
- if (parse->priv->pending_events) {
+ if (G_UNLIKELY (parse->priv->pending_events)) {
GList *l;
for (l = parse->priv->pending_events; l != NULL; l = l->next) {
@@ -864,13 +864,9 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
parse->priv->pending_events = NULL;
}
- if (buffer) {
- GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
- GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
-
-
- gst_adapter_push (parse->adapter, buffer);
- }
+ GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
+ GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
+ gst_adapter_push (parse->adapter, buffer);
/* Parse and push as many frames as possible */
/* Stop either when adapter is empty or we are flushing */
diff --git a/gst/flacparse/gstbaseparse.c b/gst/flacparse/gstbaseparse.c
index 9b4a9f13..5f35d917 100644
--- a/gst/flacparse/gstbaseparse.c
+++ b/gst/flacparse/gstbaseparse.c
@@ -982,20 +982,16 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
/* Make sure that adapter doesn't have any old data after
newsegment has been received and update our offset */
- if (parse->pending_segment) {
- gst_adapter_clear (parse->priv->adapter);
+ if (G_UNLIKELY (parse->pending_segment)) {
parse->priv->offset = parse->priv->pending_offset;
+ gst_adapter_clear (parse->priv->adapter);
}
gst_base_parse_update_upstream_durations (parse);
- if (buffer) {
- GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
- GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
-
-
- gst_adapter_push (parse->priv->adapter, buffer);
- }
+ GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
+ GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
+ gst_adapter_push (parse->priv->adapter, buffer);
/* Parse and push as many frames as possible */
/* Stop either when adapter is empty or we are flushing */