mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
flvmux: Don't leak codec_data buffer
Use gst_buffer_replace() to prevent buffer leak https://bugzilla.gnome.org/show_bug.cgi?id=797179
This commit is contained in:
parent
c6e07a6eee
commit
916ad09009
1 changed files with 2 additions and 2 deletions
|
@ -418,7 +418,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);
|
||||
|
@ -559,7 +559,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);
|
||||
|
|
Loading…
Reference in a new issue