mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
playsink: do not abort if a property is not found.
If a property is not found (for example last-sample when gst_debug_bin_to_dot_file is used while the pipeline is slightly broken (thus no last-sample) the unref of the item gvalue which is not refed fails. Only unref if it was found.
This commit is contained in:
parent
7e054c9af0
commit
71e39c0e84
1 changed files with 3 additions and 2 deletions
|
@ -1189,9 +1189,10 @@ gst_play_sink_find_property (GstPlaySink * playsink, GstElement * obj,
|
||||||
found = gst_iterator_find_custom (it,
|
found = gst_iterator_find_custom (it,
|
||||||
(GCompareFunc) find_property, &item, &helper);
|
(GCompareFunc) find_property, &item, &helper);
|
||||||
gst_iterator_free (it);
|
gst_iterator_free (it);
|
||||||
if (found)
|
if (found) {
|
||||||
result = g_value_dup_object (&item);
|
result = g_value_dup_object (&item);
|
||||||
g_value_unset (&item);
|
g_value_unset (&item);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (element_has_property (obj, name, expected_type)) {
|
if (element_has_property (obj, name, expected_type)) {
|
||||||
result = obj;
|
result = obj;
|
||||||
|
|
Loading…
Reference in a new issue