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
@ -418,7 +418,7 @@ gst_flv_mux_video_pad_setcaps (GstFlvMuxPad * pad, GstCaps * caps)
|
|||||||
const GValue *val = gst_structure_get_value (s, "codec_data");
|
const GValue *val = gst_structure_get_value (s, "codec_data");
|
||||||
|
|
||||||
if (val)
|
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);
|
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");
|
const GValue *val = gst_structure_get_value (s, "codec_data");
|
||||||
|
|
||||||
if (val)
|
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);
|
gst_object_unref (mux);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user