mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
baseparse: revert last change and properly fix
Baseparse internaly breaks the semantics of a _chain function by calling it with buffer==NULL. The reson I belived it was okay to remove it was that there is also an unchecked access to buffer later in _chain. Actually that code is wrong, as it most probably wants to set discont on the outgoing buffer.
This commit is contained in:
parent
c0f1db7ebe
commit
5a971be3aa
1 changed files with 6 additions and 4 deletions
|
@ -864,9 +864,11 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
parse->priv->pending_events = NULL;
|
parse->priv->pending_events = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
|
if (G_LIKELY (buffer)) {
|
||||||
GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
|
GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld",
|
||||||
gst_adapter_push (parse->adapter, buffer);
|
GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer));
|
||||||
|
gst_adapter_push (parse->adapter, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse and push as many frames as possible */
|
/* Parse and push as many frames as possible */
|
||||||
/* Stop either when adapter is empty or we are flushing */
|
/* Stop either when adapter is empty or we are flushing */
|
||||||
|
@ -895,7 +897,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
if (parse->priv->discont) {
|
if (parse->priv->discont) {
|
||||||
GST_DEBUG_OBJECT (parse, "marking DISCONT");
|
GST_DEBUG_OBJECT (parse, "marking DISCONT");
|
||||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (tmpbuf, GST_BUFFER_FLAG_DISCONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
skip = -1;
|
skip = -1;
|
||||||
|
|
Loading…
Reference in a new issue