From: George Kiagiadakis Date: Thu, 26 Jun 2014 08:58:04 +0000 (+0300) Subject: tests: enhance the gstcaps test_features to also test gst_caps_set_features() X-Git-Tag: 1.3.90~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4376ba4e3c46afda53e2b87fb8e28f1aef448944;p=platform%2Fupstream%2Fgstreamer.git tests: enhance the gstcaps test_features to also test gst_caps_set_features() Compliments my previous patch for gst_caps_set_features, which would previously assert and leak the old GstCapsFeatures if the caps already had a GstCapsFeatures and you were trying to replace it with a new one. --- diff --git a/tests/check/gst/gstcaps.c b/tests/check/gst/gstcaps.c index b1a1352..e529406b 100644 --- a/tests/check/gst/gstcaps.c +++ b/tests/check/gst/gstcaps.c @@ -1129,6 +1129,13 @@ GST_START_TEST (test_features) gst_caps_unref (c2); gst_caps_unref (c1); + + c1 = gst_caps_from_string ("video/x-raw"); + f1 = gst_caps_get_features (c1, 0); + f2 = gst_caps_features_new ("memory:dmabuf", NULL); + gst_caps_set_features (c1, 0, f2); + + gst_caps_unref (c1); } GST_END_TEST;