[Bug 794290] rtponviftimestamp: race condition in buffer handling leading to memory corruption
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Mar 15 10:53:48 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=794290
--- Comment #8 from Linus Svensson <linus.svensson at axis.com> ---
How about adding:
g_mutex_lock (&lock);
list = self->list;
buffer = self->buffer;
event_queue = self->event_queue;
self->list = NULL;
self->buffer = NULL;
self->event_queue = NULL;
g_mutex_unlock (&lock);
to both send_cached_buffers_and_events() and purge_cached_buffers_and_events()
and use the local variables in the rest of those functions. The cached items
are expected to be removed once any of those functions has been called.
The patch should also solve:
* purge all events in event_queue in the case pad_push fails in
send_cached_buffers_and_events()
* Perhaps move purge_cached_buffers_and_events() to be called after
change_state has chained up to the parent (Otherwise a new buffer or list might
be cached and never free'd).
--
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