mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
baseparse: fix invalid memory access in debug messages
Don't use buffers that we've given away or unrefed in debug messages.
This commit is contained in:
parent
0993102834
commit
f47c3472df
1 changed files with 4 additions and 3 deletions
|
@ -1925,9 +1925,10 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
ret = GST_FLOW_OK;
|
ret = GST_FLOW_OK;
|
||||||
} else if (ret == GST_FLOW_OK) {
|
} else if (ret == GST_FLOW_OK) {
|
||||||
if (parse->segment.rate > 0.0) {
|
if (parse->segment.rate > 0.0) {
|
||||||
ret = gst_pad_push (parse->srcpad, buffer);
|
GST_LOG_OBJECT (parse, "pushing frame (%d bytes) now..",
|
||||||
GST_LOG_OBJECT (parse, "frame (%d bytes) pushed: %s",
|
|
||||||
GST_BUFFER_SIZE (buffer), gst_flow_get_name (ret));
|
GST_BUFFER_SIZE (buffer), gst_flow_get_name (ret));
|
||||||
|
ret = gst_pad_push (parse->srcpad, buffer);
|
||||||
|
GST_LOG_OBJECT (parse, "frame pushed, flow %s", gst_flow_get_name (ret));
|
||||||
} else {
|
} else {
|
||||||
GST_LOG_OBJECT (parse, "frame (%d bytes) queued for now",
|
GST_LOG_OBJECT (parse, "frame (%d bytes) queued for now",
|
||||||
GST_BUFFER_SIZE (buffer));
|
GST_BUFFER_SIZE (buffer));
|
||||||
|
@ -1936,9 +1937,9 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
ret = GST_FLOW_OK;
|
ret = GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gst_buffer_unref (buffer);
|
|
||||||
GST_LOG_OBJECT (parse, "frame (%d bytes) not pushed: %s",
|
GST_LOG_OBJECT (parse, "frame (%d bytes) not pushed: %s",
|
||||||
GST_BUFFER_SIZE (buffer), gst_flow_get_name (ret));
|
GST_BUFFER_SIZE (buffer), gst_flow_get_name (ret));
|
||||||
|
gst_buffer_unref (buffer);
|
||||||
/* if we are not sufficiently in control, let upstream decide on EOS */
|
/* if we are not sufficiently in control, let upstream decide on EOS */
|
||||||
if (ret == GST_FLOW_UNEXPECTED &&
|
if (ret == GST_FLOW_UNEXPECTED &&
|
||||||
(parse->priv->passthrough ||
|
(parse->priv->passthrough ||
|
||||||
|
|
Loading…
Reference in a new issue