From 71e39c0e84093a4ff127575e992bfafad0c8a38f Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Mon, 14 May 2012 07:01:18 +0200 Subject: [PATCH] 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. --- gst/playback/gstplaysink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index bd60120..b772ba3 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -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; -- 2.7.4