mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
mssdemux: use gst_data_queue_push_force for adding events to queue
This prevents locking on startup when a stream only has a single buffer for one of the streams and mssdemux decides to push an EOS event right after it.
This commit is contained in:
parent
2db211e243
commit
1b1332cb6d
1 changed files with 8 additions and 1 deletions
|
@ -1022,6 +1022,7 @@ gst_mss_demux_stream_store_object (GstMssDemuxStream * stream,
|
|||
GstMiniObject * obj)
|
||||
{
|
||||
GstDataQueueItem *item;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
item = g_slice_new (GstDataQueueItem);
|
||||
item->object = (GstMiniObject *) obj;
|
||||
|
@ -1032,7 +1033,13 @@ gst_mss_demux_stream_store_object (GstMssDemuxStream * stream,
|
|||
|
||||
item->destroy = (GDestroyNotify) _free_data_queue_item;
|
||||
|
||||
if (!gst_data_queue_push (stream->dataqueue, item)) {
|
||||
if (G_LIKELY (GST_IS_BUFFER (obj))) {
|
||||
ret = gst_data_queue_push (stream->dataqueue, item);
|
||||
} else {
|
||||
ret = gst_data_queue_push_force (stream->dataqueue, item);
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
GST_DEBUG_OBJECT (stream->parent, "Failed to store object %p", obj);
|
||||
item->destroy (item);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue