mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
souphttpsrc: Don't return a buffer when returning not GST_FLOW_OK
basesrc assumes that we don't return a buffer if something else than OK is returned. It will just leak any buffer we might accidentially provide here. This can potentially happen during flushing. Maybe fixes https://bugzilla.gnome.org/show_bug.cgi?id=741993
This commit is contained in:
parent
d416336a6e
commit
bbcfc3b9e6
1 changed files with 12 additions and 0 deletions
|
@ -1709,6 +1709,18 @@ gst_soup_http_src_do_request (GstSoupHTTPSrc * src, const gchar * method,
|
||||||
src->ret = GST_FLOW_EOS;
|
src->ret = GST_FLOW_EOS;
|
||||||
g_cond_signal (&src->request_finished_cond);
|
g_cond_signal (&src->request_finished_cond);
|
||||||
|
|
||||||
|
/* basesrc assumes that we don't return a buffer if
|
||||||
|
* something else than OK is returned. It will just
|
||||||
|
* leak any buffer we might accidentially provide
|
||||||
|
* here.
|
||||||
|
*
|
||||||
|
* This can potentially happen during flushing.
|
||||||
|
*/
|
||||||
|
if (src->ret != GST_FLOW_OK && outbuf && *outbuf) {
|
||||||
|
gst_buffer_unref (*outbuf);
|
||||||
|
*outbuf = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return src->ret;
|
return src->ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue