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
@ -1022,6 +1022,7 @@ gst_mss_demux_stream_store_object (GstMssDemuxStream * stream,
|
|||||||
GstMiniObject * obj)
|
GstMiniObject * obj)
|
||||||
{
|
{
|
||||||
GstDataQueueItem *item;
|
GstDataQueueItem *item;
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
item = g_slice_new (GstDataQueueItem);
|
item = g_slice_new (GstDataQueueItem);
|
||||||
item->object = (GstMiniObject *) obj;
|
item->object = (GstMiniObject *) obj;
|
||||||
@ -1032,7 +1033,13 @@ gst_mss_demux_stream_store_object (GstMssDemuxStream * stream,
|
|||||||
|
|
||||||
item->destroy = (GDestroyNotify) _free_data_queue_item;
|
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);
|
GST_DEBUG_OBJECT (stream->parent, "Failed to store object %p", obj);
|
||||||
item->destroy (item);
|
item->destroy (item);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user