mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 11:29:55 +00:00
mpeg2dec: don't deadlock when setting an index
This commit is contained in:
parent
894760b682
commit
7bccbfdd48
1 changed files with 3 additions and 2 deletions
|
@ -299,10 +299,11 @@ gst_mpeg2dec_set_index (GstElement * element, GstIndex * index)
|
||||||
mpeg2dec->index_id = 0;
|
mpeg2dec->index_id = 0;
|
||||||
if (index) {
|
if (index) {
|
||||||
mpeg2dec->index = gst_object_ref (index);
|
mpeg2dec->index = gst_object_ref (index);
|
||||||
gst_index_get_writer_id (index, GST_OBJECT (element), &mpeg2dec->index_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (mpeg2dec);
|
GST_OBJECT_UNLOCK (mpeg2dec);
|
||||||
|
/* object lock might be taken again */
|
||||||
|
if (index)
|
||||||
|
gst_index_get_writer_id (index, GST_OBJECT (element), &mpeg2dec->index_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstIndex *
|
static GstIndex *
|
||||||
|
|
Loading…
Reference in a new issue