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:
Alban Browaeys 2012-05-14 07:01:18 +02:00 committed by Sebastian Dröge
parent 7e054c9af0
commit 71e39c0e84

View file

@ -1189,9 +1189,10 @@ gst_play_sink_find_property (GstPlaySink * playsink, GstElement * obj,
found = gst_iterator_find_custom (it,
(GCompareFunc) find_property, &item, &helper);
gst_iterator_free (it);
if (found)
if (found) {
result = g_value_dup_object (&item);
g_value_unset (&item);
g_value_unset (&item);
}
} else {
if (element_has_property (obj, name, expected_type)) {
result = obj;