mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
flvdemux: Fix tests warning from setting a NULL index
Setting a null index in the tests was causing warnings by unreffing NULL pointers. This is a bug exposed by a recent change in core, it seems.
This commit is contained in:
parent
a26a2a9ff5
commit
3f69f8d3ee
1 changed files with 7 additions and 4 deletions
|
@ -1183,11 +1183,14 @@ gst_flv_demux_set_index (GstElement * element, GstIndex * index)
|
|||
GST_OBJECT_LOCK (demux);
|
||||
if (demux->index)
|
||||
gst_object_unref (demux->index);
|
||||
demux->index = gst_object_ref (index);
|
||||
GST_OBJECT_UNLOCK (demux);
|
||||
if (index) {
|
||||
demux->index = gst_object_ref (index);
|
||||
gst_index_get_writer_id (index, GST_OBJECT (element), &demux->index_id);
|
||||
demux->own_index = FALSE;
|
||||
} else
|
||||
demux->index = NULL;
|
||||
|
||||
gst_index_get_writer_id (index, GST_OBJECT (element), &demux->index_id);
|
||||
demux->own_index = FALSE;
|
||||
GST_OBJECT_UNLOCK (demux);
|
||||
}
|
||||
|
||||
static GstIndex *
|
||||
|
|
Loading…
Reference in a new issue