mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtmpsrc: fix buffer leak on read error or EOS
This commit is contained in:
parent
6c228eef59
commit
33b587de1d
1 changed files with 2 additions and 0 deletions
|
@ -405,12 +405,14 @@ gst_rtmp_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
|
|||
|
||||
read_failed:
|
||||
{
|
||||
gst_buffer_unmap (buf, &map);
|
||||
gst_buffer_unref (buf);
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), ("Failed to read data"));
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
eos:
|
||||
{
|
||||
gst_buffer_unmap (buf, &map);
|
||||
gst_buffer_unref (buf);
|
||||
if (src->cur_offset == 0) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
|
||||
|
|
Loading…
Reference in a new issue