mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 23:14:46 +00:00
libs/gst/base/gstbasesink.c: When the subclass event handler releases the PREROLL_LOCK, we could be in the flushing s...
Original commit message from CVS: Based on patch by: Jason Zhao <e3423c at motorola dot com> * libs/gst/base/gstbasesink.c: (gst_base_sink_render_object): When the subclass event handler releases the PREROLL_LOCK, we could be in the flushing state and we have to ignore the event. Fixes #548394.
This commit is contained in:
parent
bfd08292ec
commit
b981ec6e09
2 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-08-19 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
Based on patch by: Jason Zhao <e3423c at motorola dot com>
|
||||
|
||||
* libs/gst/base/gstbasesink.c: (gst_base_sink_render_object):
|
||||
When the subclass event handler releases the PREROLL_LOCK, we could be
|
||||
in the flushing state and we have to ignore the event. Fixes #548394.
|
||||
|
||||
2008-08-18 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||
|
||||
* tools/gst-launch.1.in:
|
||||
|
|
|
@ -2108,6 +2108,9 @@ no_timestamp:
|
|||
}
|
||||
}
|
||||
|
||||
/* called before and after calling the render vmethod. It keeps track of how
|
||||
* much time was spent in the render method and is used to check if we are
|
||||
* flooded */
|
||||
static void
|
||||
gst_base_sink_do_render_stats (GstBaseSink * basesink, gboolean start)
|
||||
{
|
||||
|
@ -2205,6 +2208,12 @@ gst_base_sink_render_object (GstBaseSink * basesink, GstPad * pad,
|
|||
if (bclass->event)
|
||||
event_res = bclass->event (basesink, event);
|
||||
|
||||
/* when we get here we could be flushing again when the event handler calls
|
||||
* _wait_eos() or releases the preroll lock in any other way.
|
||||
* We have to ignore this object in that case. */
|
||||
if (G_UNLIKELY (basesink->flushing))
|
||||
goto flushing;
|
||||
|
||||
if (G_LIKELY (event_res)) {
|
||||
switch (type) {
|
||||
case GST_EVENT_EOS:
|
||||
|
@ -2251,6 +2260,12 @@ dropped:
|
|||
GST_DEBUG_OBJECT (basesink, "buffer late, dropping");
|
||||
goto done;
|
||||
}
|
||||
flushing:
|
||||
{
|
||||
GST_DEBUG_OBJECT (basesink, "we are flushing, ignore object");
|
||||
gst_mini_object_unref (obj);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
}
|
||||
}
|
||||
|
||||
/* with STREAM_LOCK, PREROLL_LOCK
|
||||
|
|
Loading…
Reference in a new issue