summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2005-08-11 14:13:48 +0000
committerTim-Philipp Müller <tim@centricular.net>2005-08-11 14:13:48 +0000
commitb1f690a2061c37657135b949ee062a213de25e54 (patch)
treee8bb0764c4f030137806064dac384ad64931f85e
parent1671b7d73a6e2791729f83e3af3ef4e3dfca020f (diff)
downloadgst-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.
-rw-r--r--ChangeLog6
-rw-r--r--gst/freeze/gstfreeze.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a6c1a6f..3e935fc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-11 Tim-Philipp Müller <tim at centricular dot net>
+
+ * 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.
+
2005-08-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_chain):
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) {