mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
h264parse: plug some more buffer leaks
This commit is contained in:
parent
1c4b6fee9b
commit
e5d5ff4394
1 changed files with 5 additions and 2 deletions
|
@ -1138,9 +1138,10 @@ gst_h264_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
gst_byte_reader_skip_unchecked (&br, len);
|
gst_byte_reader_skip_unchecked (&br, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (h264parse->split_packetized)
|
if (h264parse->split_packetized) {
|
||||||
|
gst_buffer_unref (buffer);
|
||||||
return ret;
|
return ret;
|
||||||
else {
|
} else {
|
||||||
/* nal processing in pass-through might have collected stuff;
|
/* nal processing in pass-through might have collected stuff;
|
||||||
* ensure nothing happens with this later on */
|
* ensure nothing happens with this later on */
|
||||||
gst_adapter_clear (h264parse->frame_out);
|
gst_adapter_clear (h264parse->frame_out);
|
||||||
|
@ -1154,6 +1155,7 @@ exit:
|
||||||
not_negotiated:
|
not_negotiated:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (h264parse, "insufficient data to split input");
|
GST_DEBUG_OBJECT (h264parse, "insufficient data to split input");
|
||||||
|
gst_buffer_unref (buffer);
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
}
|
}
|
||||||
parse_failed:
|
parse_failed:
|
||||||
|
@ -1161,6 +1163,7 @@ parse_failed:
|
||||||
if (h264parse->split_packetized) {
|
if (h264parse->split_packetized) {
|
||||||
GST_ELEMENT_ERROR (h264parse, STREAM, FAILED, (NULL),
|
GST_ELEMENT_ERROR (h264parse, STREAM, FAILED, (NULL),
|
||||||
("invalid AVC input data"));
|
("invalid AVC input data"));
|
||||||
|
gst_buffer_unref (buffer);
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
} else {
|
} else {
|
||||||
/* do not meddle to much in this case */
|
/* do not meddle to much in this case */
|
||||||
|
|
Loading…
Reference in a new issue