From: Tim-Philipp Müller Date: Mon, 2 Dec 2013 00:10:43 +0000 (+0000) Subject: deinterlace: microoptimisation: avoid some unnecessary GValue copies X-Git-Tag: 1.19.3~509^2~5124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a424fb289bbb554f8a5d74a963d22d31ddad8ae1;p=platform%2Fupstream%2Fgstreamer.git deinterlace: microoptimisation: avoid some unnecessary GValue copies --- diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index e13c41b..32c5587 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -2208,11 +2208,10 @@ gst_deinterlace_getcaps (GstDeinterlace * self, GstPad * pad, GstCaps * filter) gst_value_set_fraction (&nmax, n, d); gst_value_set_fraction_range (&nrange, &nmin, &nmax); - gst_structure_set_value (s, "framerate", &nrange); + gst_structure_take_value (s, "framerate", &nrange); g_value_unset (&nmin); g_value_unset (&nmax); - g_value_unset (&nrange); } else if (G_VALUE_TYPE (val) == GST_TYPE_LIST) { const GValue *lval; GValue nlist = { 0, }; @@ -2240,11 +2239,9 @@ gst_deinterlace_getcaps (GstDeinterlace * self, GstPad * pad, GstCaps * filter) g_value_init (&nval, GST_TYPE_FRACTION); gst_value_set_fraction (&nval, n, d); - gst_value_list_append_value (&nlist, &nval); - g_value_unset (&nval); + gst_value_list_append_and_take_value (&nlist, &nval); } - gst_structure_set_value (s, "framerate", &nlist); - g_value_unset (&nlist); + gst_structure_take_value (s, "framerate", &nlist); } } }