summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-10-01 23:05:03 +0530
committerSebastian Dröge <sebastian@centricular.com>2014-10-14 09:36:50 +0200
commitb74a2ad492c4921f05e955ffbe5134d91a050bea (patch)
tree66a41aa5efbd7962d9a4d448c6f219be218f1f20
parentbbcd106adc5ad0d989925346a35b58020aeb5604 (diff)
souphttpclientsink: Free queued buffers in ::reset
::render sets a new callback for writing out new buffers only if there aren't already buffers queued for writing with a previously-scheduled callback. However, if the previously-scheduled callback is interrupted by a state change (either manually or due to an error) and there are still buffers in the queue, restarting the pipeline will result in buffers being queued forever, and no callbacks will ever be scheduled, and no buffers will be written out. https://bugzilla.gnome.org/show_bug.cgi?id=737739
-rw-r--r--ext/soup/gstsouphttpclientsink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/soup/gstsouphttpclientsink.c b/ext/soup/gstsouphttpclientsink.c
index 904d71c4c..a1bfa1b74 100644
--- a/ext/soup/gstsouphttpclientsink.c
+++ b/ext/soup/gstsouphttpclientsink.c
@@ -244,6 +244,9 @@ gst_soup_http_client_sink_init (GstSoupHttpClientSink * souphttpsink)
static void
gst_soup_http_client_sink_reset (GstSoupHttpClientSink * souphttpsink)
{
+ g_list_free_full (souphttpsink->queued_buffers,
+ (GDestroyNotify) gst_buffer_unref);
+ souphttpsink->queued_buffers = NULL;
g_free (souphttpsink->reason_phrase);
souphttpsink->reason_phrase = NULL;
souphttpsink->status_code = 0;