mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
matroska: error mode if can't push buffer
If gst_pad_push() fails, inform and return flow error.
This commit is contained in:
parent
f494da89b4
commit
db3ade5bfb
1 changed files with 7 additions and 4 deletions
|
@ -2414,7 +2414,7 @@ static GstFlowReturn
|
|||
gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer,
|
||||
gboolean keyframe)
|
||||
{
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
GstFlowReturn ret;
|
||||
|
||||
if (!parse->pushed_headers) {
|
||||
GstCaps *caps;
|
||||
|
@ -2457,7 +2457,11 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer,
|
|||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
|
||||
gst_pad_push (parse->srcpad, buf);
|
||||
ret = gst_pad_push (parse->srcpad, buf);
|
||||
if (ret != GST_FLOW_OK) {
|
||||
GST_WARNING_OBJECT (parse, "Failed to push buffer");
|
||||
return ret;
|
||||
}
|
||||
|
||||
parse->pushed_headers = TRUE;
|
||||
}
|
||||
|
@ -2472,9 +2476,8 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer,
|
|||
} else {
|
||||
GST_BUFFER_TIMESTAMP (buffer) = parse->last_timestamp;
|
||||
}
|
||||
ret = gst_pad_push (parse->srcpad, gst_buffer_ref (buffer));
|
||||
|
||||
return ret;
|
||||
return gst_pad_push (parse->srcpad, gst_buffer_ref (buffer));
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
Loading…
Reference in a new issue