[Bug 744261] curl: add curlhttpsrc
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jul 24 07:26:02 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=744261
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #356056|none |needs-work
status| |
--- Comment #22 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 356056:
--> (https://bugzilla.gnome.org/review?bug=744261&attachment=356056)
Just very shortly went over the code, some comments below
::: ext/curl/gstcurlhttpsrc.c
@@ +7,3 @@
+ * Based on the GstElement template, courtesy of
+ * Copyright (C) 2005 Thomas Vander Stichele <thomas at apestaart.org>
+ * Copyright (C) 2005 Ronald S. Bultje <rbultje at ronald.bitfreak.net>
This can probably go away, it's a template after all and not really doing
anything
@@ +1704,3 @@
+ g_mutex_lock (&s->buffer_mutex);
+ s->buffer =
+ realloc (s->buffer, (s->buffer_len + chunk_len + 1) * sizeof (char));
Use g_realloc(), g_malloc(), g_free() please
@@ +1711,3 @@
+ memcpy (s->buffer + s->buffer_len, chunk, chunk_len);
+ s->buffer_len += chunk_len;
+ g_cond_signal (&s->signal);
You also need to signal in GstBaseSrc::unlock(), and then go out of ::create()
(etc) ASAP, returning GST_FLOW_FLUSHING. And all following calls until
GstBaseSrc::unlock_stop should behave the same (immediately return
GST_FLOW_FLUSHING).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list