diff options
author | Seungha Yang <seungha.yang@navercorp.com> | 2018-09-20 12:12:55 +0900 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-01 19:27:27 +0100 |
commit | a1a165a68980766f86cf34f3598a58fb9c3ac864 (patch) | |
tree | e15da36cbf88a0460e3162fd0ee24f19b945d679 | |
parent | 61a9b13942cd7cf43ff17cf13d10da0d68f0608e (diff) | |
download | gstreamer-plugins-good-a1a165a68980766f86cf34f3598a58fb9c3ac864.tar.gz |
flvmux: Don't leak codec_data buffer
Use gst_buffer_replace() to prevent buffer leak
https://bugzilla.gnome.org/show_bug.cgi?id=797179
-rw-r--r-- | gst/flv/gstflvmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index 55d8b8422..50bcda0ee 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -416,7 +416,7 @@ gst_flv_mux_video_pad_setcaps (GstFlvMuxPad * pad, GstCaps * caps) const GValue *val = gst_structure_get_value (s, "codec_data"); if (val) - pad->codec_data = gst_buffer_ref (gst_value_get_buffer (val)); + gst_buffer_replace (&pad->codec_data, gst_value_get_buffer (val)); } gst_object_unref (mux); @@ -557,7 +557,7 @@ gst_flv_mux_audio_pad_setcaps (GstFlvMuxPad * pad, GstCaps * caps) const GValue *val = gst_structure_get_value (s, "codec_data"); if (val) - pad->codec_data = gst_buffer_ref (gst_value_get_buffer (val)); + gst_buffer_replace (&pad->codec_data, gst_value_get_buffer (val)); } gst_object_unref (mux); |