mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
vaapipostproc: fixes for memory leaks
The use of gst_vaapi_value_set_format() and gst_structure_*_value() requires to clear the used GValue to avoid a memory leak.
This commit is contained in:
parent
24af97a7d1
commit
5c3318227b
1 changed files with 6 additions and 5 deletions
|
@ -48,6 +48,7 @@ _transform_format (GstVaapiPostproc * postproc, GstCapsFeatures * features,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gst_structure_set_value (structure, "format", &value);
|
gst_structure_set_value (structure, "format", &value);
|
||||||
|
g_value_unset (&value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -615,11 +616,11 @@ _set_preferred_format (GstStructure * outs, GstVideoFormat format)
|
||||||
if (format == GST_VIDEO_FORMAT_UNKNOWN || format == GST_VIDEO_FORMAT_ENCODED)
|
if (format == GST_VIDEO_FORMAT_UNKNOWN || format == GST_VIDEO_FORMAT_ENCODED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (gst_vaapi_value_set_format (&value, format)) {
|
if (!gst_vaapi_value_set_format (&value, format))
|
||||||
gst_structure_set_value (outs, "format", &value);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
gst_structure_set_value (outs, "format", &value);
|
||||||
|
g_value_unset (&value);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
|
|
Loading…
Reference in a new issue