mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
streamsynchronizer: force fallback buffer_alloc when other pad not available
... to avoid unnecessary spurious errors (upon e.g. shutdown). If a real error is applicable in this unusual circumstance (missing other pad), other (STREAM_LOCK protected) call paths can take care of that.
This commit is contained in:
parent
af28016d0a
commit
3e0d35aec4
1 changed files with 5 additions and 1 deletions
|
@ -565,7 +565,7 @@ gst_stream_synchronizer_sink_bufferalloc (GstPad * pad, guint64 offset,
|
|||
guint size, GstCaps * caps, GstBuffer ** buf)
|
||||
{
|
||||
GstPad *opad;
|
||||
GstFlowReturn ret = GST_FLOW_ERROR;
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
||||
GST_LOG_OBJECT (pad, "Allocating buffer: size=%u", size);
|
||||
|
||||
|
@ -573,6 +573,10 @@ gst_stream_synchronizer_sink_bufferalloc (GstPad * pad, guint64 offset,
|
|||
if (opad) {
|
||||
ret = gst_pad_alloc_buffer (opad, offset, size, caps, buf);
|
||||
gst_object_unref (opad);
|
||||
} else {
|
||||
/* may have been released during shutdown;
|
||||
* silently trigger fallback */
|
||||
*buf = NULL;
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (pad, "Allocation: %s", gst_flow_get_name (ret));
|
||||
|
|
Loading…
Reference in a new issue