mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
pad: Check sinkpad for flushing
Check the sinkpad for the flushing state before calling the chainfunction on the pad. We do this by checking the cache (which is also cleared on the srcpad when the sink is set to flushing). Fixes #641928
This commit is contained in:
parent
3aaef921c5
commit
12d2d01663
1 changed files with 16 additions and 0 deletions
16
gst/gstpad.c
16
gst/gstpad.c
|
@ -4658,6 +4658,8 @@ gst_pad_push (GstPad * pad, GstBuffer * buffer)
|
|||
peer = cache->peer;
|
||||
|
||||
GST_PAD_STREAM_LOCK (peer);
|
||||
if (G_UNLIKELY (g_atomic_pointer_get (cache_ptr) == PAD_CACHE_INVALID))
|
||||
goto invalid;
|
||||
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "calling chainfunction &%s",
|
||||
GST_DEBUG_FUNCPTR_NAME (GST_PAD_CHAINFUNC (peer)));
|
||||
|
@ -4697,6 +4699,12 @@ slow_path:
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
invalid:
|
||||
{
|
||||
pad_free_cache (cache);
|
||||
GST_PAD_STREAM_UNLOCK (peer);
|
||||
goto slow_path;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4770,6 +4778,8 @@ gst_pad_push_list (GstPad * pad, GstBufferList * list)
|
|||
peer = cache->peer;
|
||||
|
||||
GST_PAD_STREAM_LOCK (peer);
|
||||
if (G_UNLIKELY (g_atomic_pointer_get (cache_ptr) == PAD_CACHE_INVALID))
|
||||
goto invalid;
|
||||
|
||||
ret = GST_PAD_CHAINLISTFUNC (peer) (peer, list);
|
||||
|
||||
|
@ -4801,6 +4811,12 @@ slow_path:
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
invalid:
|
||||
{
|
||||
pad_free_cache (cache);
|
||||
GST_PAD_STREAM_UNLOCK (peer);
|
||||
goto slow_path;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue