mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
souphttpsrc: fix buffer leak when flushing
When early returning in gst_soup_http_src_read_buffer() because the element is FLUSHING, we need to unmap and unref the buffer which was just created. https://bugzilla.gnome.org/show_bug.cgi?id=766718
This commit is contained in:
parent
7cd9d34c80
commit
6fd04b07fc
1 changed files with 2 additions and 0 deletions
|
@ -1570,6 +1570,8 @@ gst_soup_http_src_read_buffer (GstSoupHTTPSrc * src, GstBuffer ** outbuf)
|
||||||
|
|
||||||
g_mutex_lock (&src->mutex);
|
g_mutex_lock (&src->mutex);
|
||||||
if (g_cancellable_is_cancelled (src->cancellable)) {
|
if (g_cancellable_is_cancelled (src->cancellable)) {
|
||||||
|
gst_buffer_unmap (*outbuf, &mapinfo);
|
||||||
|
gst_buffer_unref (*outbuf);
|
||||||
g_mutex_unlock (&src->mutex);
|
g_mutex_unlock (&src->mutex);
|
||||||
return GST_FLOW_FLUSHING;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue