flvdemux: fix deadlock on setting index on flvdemux
This commit is contained in:
parent
c6abc45d27
commit
bb23575f6b
@ -3101,12 +3101,16 @@ gst_flv_demux_set_index (GstElement * element, GstIndex * index)
|
|||||||
gst_object_unref (demux->index);
|
gst_object_unref (demux->index);
|
||||||
if (index) {
|
if (index) {
|
||||||
demux->index = gst_object_ref (index);
|
demux->index = gst_object_ref (index);
|
||||||
gst_index_get_writer_id (index, GST_OBJECT (element), &demux->index_id);
|
|
||||||
demux->own_index = FALSE;
|
demux->own_index = FALSE;
|
||||||
} else
|
} else
|
||||||
demux->index = NULL;
|
demux->index = NULL;
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (demux);
|
GST_OBJECT_UNLOCK (demux);
|
||||||
|
/* object lock might be taken again */
|
||||||
|
if (index)
|
||||||
|
gst_index_get_writer_id (index, GST_OBJECT (element), &demux->index_id);
|
||||||
|
GST_DEBUG_OBJECT (demux, "Set index %" GST_PTR_FORMAT, demux->index);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstIndex *
|
static GstIndex *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user