From: <wt...@ke...> - 2006-10-11 10:10:52
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Wed Oct 11 2006 10:10:49 UTC Log message: Patch by: Sjoerd Simons <sjoerd at luon dot net> * plugins/elements/gstqueue.c: (gst_queue_chain): Recheck queue filledness after signalling the overrun when we're about to leak downstream because we released the lock when emitting the signal and the queue could be empty again. Fixes #352345. Modified files: . : ChangeLog plugins/elements: gstqueue.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2868&r2=1.2869 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/plugins/elements/gstqueue.c.diff?r1=1.186&r2=1.187 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2868 retrieving revision 1.2869 diff -u -d -r1.2868 -r1.2869 --- ChangeLog 11 Oct 2006 09:13:26 -0000 1.2868 +++ ChangeLog 11 Oct 2006 10:10:37 -0000 1.2869 @@ -1,3 +1,12 @@ +2006-10-11 Wim Taymans <wi...@fl...> + + Patch by: Sjoerd Simons <sjoerd at luon dot net> + * plugins/elements/gstqueue.c: (gst_queue_chain): + Recheck queue filledness after signalling the overrun when we're about + to leak downstream because we released the lock when emitting the signal + and the queue could be empty again. Fixes #352345. 2006-10-11 Tim-Philipp Müller <tim at centricular dot net> * libs/gst/controller/gstcontroller.c: (gst_controller_new_list): Index: gstqueue.c RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstqueue.c,v retrieving revision 1.186 retrieving revision 1.187 diff -u -d -r1.186 -r1.187 --- gstqueue.c 19 May 2006 13:46:10 -0000 1.186 +++ gstqueue.c 11 Oct 2006 10:10:37 -0000 1.187 @@ -654,6 +654,13 @@ GList *item; GstMiniObject *leak = NULL; + if (!gst_queue_is_filled (queue)) { + /* Queue was emptied while we sent out the signal, so no need to drop */ + GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, + "queue emptied while emitting signal, not leaking buffer"); + break; + } GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "queue is full, leaking buffer on downstream end"); |