diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2005-08-11 14:13:48 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2005-08-11 14:13:48 +0000 |
commit | b1f690a2061c37657135b949ee062a213de25e54 (patch) | |
tree | e8bb0764c4f030137806064dac384ad64931f85e /gst | |
parent | 1671b7d73a6e2791729f83e3af3ef4e3dfca020f (diff) | |
download | gst-plugins-bad-b1f690a2061c37657135b949ee062a213de25e54.tar.gz gst-plugins-bad-b1f690a2061c37657135b949ee062a213de25e54.tar.bz2 gst-plugins-bad-b1f690a2061c37657135b949ee062a213de25e54.zip |
gst/freeze/gstfreeze.c: Fix invalid memory access: GST_IS_BUFFER() can't be used on an event that we have already unr...
Original commit message from CVS:
* gst/freeze/gstfreeze.c: (gst_freeze_loop):
Fix invalid memory access: GST_IS_BUFFER() can't be used
on an event that we have already unref'ed.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/freeze/gstfreeze.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/freeze/gstfreeze.c b/gst/freeze/gstfreeze.c index 384c7720..475bc191 100644 --- a/gst/freeze/gstfreeze.c +++ b/gst/freeze/gstfreeze.c @@ -177,10 +177,9 @@ gst_freeze_loop (GstElement * element) break; default: gst_pad_event_default (GST_PAD (freeze->sinkpad), GST_EVENT (data)); + break; } - } - - if (GST_IS_BUFFER (data)) { + } else if (GST_IS_BUFFER (data)) { if (g_list_length (freeze->buffers) < freeze->max_buffers || freeze->max_buffers == 0) { freeze->buffers = g_list_append (freeze->buffers, GST_BUFFER (data)); @@ -190,6 +189,7 @@ gst_freeze_loop (GstElement * element) gst_buffer_unref (GST_BUFFER (data)); } } + data = NULL; } if (freeze->buffers == NULL) { |