mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
h264parse: don't leak all NAL buffers
gst_buffer_replace() doesn't steal the ref. Partial fix for bug #645502.
This commit is contained in:
parent
4223e6fb89
commit
3e4e198c5e
1 changed files with 5 additions and 1 deletions
|
@ -166,7 +166,11 @@ gst_h264_params_store_nal (GstH264Params * params, GstBuffer ** store, gint id,
|
||||||
gst_nal_bs_get_data (bs, &data, &size);
|
gst_nal_bs_get_data (bs, &data, &size);
|
||||||
buf = gst_buffer_new_and_alloc (size);
|
buf = gst_buffer_new_and_alloc (size);
|
||||||
memcpy (GST_BUFFER_DATA (buf), data, size);
|
memcpy (GST_BUFFER_DATA (buf), data, size);
|
||||||
gst_buffer_replace (store + id, buf);
|
|
||||||
|
if (store[id])
|
||||||
|
gst_buffer_unref (store[id]);
|
||||||
|
|
||||||
|
store[id] = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstH264ParamsSPS *
|
static GstH264ParamsSPS *
|
||||||
|
|
Loading…
Reference in a new issue