summaryrefslogtreecommitdiffstats
path: root/gst/flacparse
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-02-26 11:02:06 +0200
committerStefan Kost <ensonic@users.sf.net>2009-02-26 11:05:31 +0200
commit68cb1a84de980471c2727bfe896a165053a6fe50 (patch)
tree811aeb9365ee22ba19ff4c9aadb19478a096560e /gst/flacparse
parent3ee87fa8f2591f2780b22fe8530038c0206d2c78 (diff)
downloadgst-plugins-bad-68cb1a84de980471c2727bfe896a165053a6fe50.tar.gz
gst-plugins-bad-68cb1a84de980471c2727bfe896a165053a6fe50.tar.bz2
gst-plugins-bad-68cb1a84de980471c2727bfe896a165053a6fe50.zip
baseparse: remove checks for buffer==NULL
Accordifn to docs for GstPadChainFunction buffer cannot be NULL. If we would leave the check, we would also need more such check below.
Diffstat (limited to 'gst/flacparse')
-rw-r--r--gst/flacparse/gstbaseparse.c14
1 files changed, 5 insertions, 9 deletions
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 */