summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorRené Stadler <mail@renestadler.de>2011-03-24 21:44:07 +0200
committerRené Stadler <mail@renestadler.de>2011-03-24 21:53:13 +0200
commit3e4e198c5ed26c58d703b28eb417410b85e35370 (patch)
tree9c3c11d5bf201300e030dca6b8ece6967f541785 /gst
parent4223e6fb897faf38c5e280432c32d9874cc8770a (diff)
h264parse: don't leak all NAL buffers
gst_buffer_replace() doesn't steal the ref. Partial fix for bug #645502.
Diffstat (limited to 'gst')
-rw-r--r--gst/videoparsers/h264parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/videoparsers/h264parse.c b/gst/videoparsers/h264parse.c
index f0ec757f8..4430a0225 100644
--- a/gst/videoparsers/h264parse.c
+++ b/gst/videoparsers/h264parse.c
@@ -166,7 +166,11 @@ gst_h264_params_store_nal (GstH264Params * params, GstBuffer ** store, gint id,
gst_nal_bs_get_data (bs, &data, &size);
buf = gst_buffer_new_and_alloc (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 *