From b1f690a2061c37657135b949ee062a213de25e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 11 Aug 2005 14:13:48 +0000 Subject: 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. --- gst/freeze/gstfreeze.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gst') 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) { -- cgit v1.2.1