x265: fix a minor string leak

https://bugzilla.gnome.org/show_bug.cgi?id=776727
This commit is contained in:
Fabrice Bellet 2017-01-02 21:05:55 +01:00 committed by Tim-Philipp Müller
parent aac4c10d0e
commit de27514b9b

View file

@ -55,8 +55,6 @@ enum
PROP_TUNE
};
static GString *x265enc_defaults;
#define PROP_BITRATE_DEFAULT (2 * 1024)
#define PROP_QP_DEFAULT -1
#define PROP_OPTION_STRING_DEFAULT ""
@ -344,8 +342,6 @@ gst_x265_enc_class_init (GstX265EncClass * klass)
GstElementClass *element_class;
GstVideoEncoderClass *gstencoder_class;
x265enc_defaults = g_string_new ("");
gobject_class = G_OBJECT_CLASS (klass);
element_class = GST_ELEMENT_CLASS (klass);
gstencoder_class = GST_VIDEO_ENCODER_CLASS (klass);
@ -542,6 +538,8 @@ gst_x265_enc_finalize (GObject * object)
gst_x265_enc_close_encoder (encoder);
g_string_free (encoder->option_string_prop, TRUE);
G_OBJECT_CLASS (parent_class)->finalize (object);
}