mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
va: jpegenc: Fix a memory leak when filter sink caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
This commit is contained in:
parent
dfccbd52f4
commit
6bb294343b
1 changed files with 6 additions and 3 deletions
|
@ -1216,8 +1216,10 @@ _filter_sink_caps (GstCaps * sinkcaps)
|
|||
guint32 fourcc;
|
||||
|
||||
val = gst_structure_get_value (st, "drm-format");
|
||||
if (!val)
|
||||
if (!val) {
|
||||
gst_structure_free (st);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (G_VALUE_HOLDS_STRING (val)) {
|
||||
format_str = g_value_get_string (val);
|
||||
|
@ -1253,8 +1255,10 @@ _filter_sink_caps (GstCaps * sinkcaps)
|
|||
gst_caps_features_copy (features));
|
||||
} else {
|
||||
val = gst_structure_get_value (st, "format");
|
||||
if (!val)
|
||||
if (!val) {
|
||||
gst_structure_free (st);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (G_VALUE_HOLDS_STRING (val)) {
|
||||
format_str = g_value_get_string (val);
|
||||
|
@ -1299,7 +1303,6 @@ _filter_sink_caps (GstCaps * sinkcaps)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
gst_va_jpeg_enc_register (GstPlugin * plugin, GstVaDevice * device,
|
||||
GstCaps * sink_caps, GstCaps * src_caps, guint rank,
|
||||
|
|
Loading…
Reference in a new issue