mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
queue2: fix memory leak
unmap the buffer memory on errors.
This commit is contained in:
parent
166f6e1cc5
commit
fe9e284463
1 changed files with 2 additions and 0 deletions
|
@ -1288,12 +1288,14 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length,
|
|||
hit_eos:
|
||||
{
|
||||
GST_DEBUG_OBJECT (queue, "EOS hit and we don't have any requested data");
|
||||
gst_buffer_unmap (buf, &info);
|
||||
gst_buffer_unref (buf);
|
||||
return GST_FLOW_EOS;
|
||||
}
|
||||
out_flushing:
|
||||
{
|
||||
GST_DEBUG_OBJECT (queue, "we are flushing");
|
||||
gst_buffer_unmap (buf, &info);
|
||||
gst_buffer_unref (buf);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue