From 1778cae1a7926e8f45bbffa1c312ab454320c1f3 Mon Sep 17 00:00:00 2001 From: "Joshua N. Pritikin" Date: Wed, 23 Jul 2003 08:20:24 +0000 Subject: Take a hint from dschleef and grab the bufferpool at the last possible moment instead of in gst_colorspace_srcconnect... Original commit message from CVS: Take a hint from dschleef and grab the bufferpool at the last possible moment instead of in gst_colorspace_srcconnect_func. I don't know if this is the "correct" fix, but I'm going to commit anyway because colorspace doesn't work _at_ _all_ without this change. --- ext/hermes/gstcolorspace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/hermes/gstcolorspace.c b/ext/hermes/gstcolorspace.c index 748b8c1d..e7dc9cf6 100644 --- a/ext/hermes/gstcolorspace.c +++ b/ext/hermes/gstcolorspace.c @@ -404,7 +404,6 @@ gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps) goto done; success: - space->pool = gst_pad_get_bufferpool (space->srcpad); done: return res; @@ -502,6 +501,9 @@ gst_colorspace_chain (GstPad *pad,GstBuffer *buf) dest_bytes = ((space->destbpp+7)/8); src_bytes = ((space->srcbpp+7)/8); + if (!space->pool) + space->pool = gst_pad_get_bufferpool (space->srcpad); + if (space->pool) { outbuf = gst_buffer_new_from_pool (space->pool, 0, 0); } -- cgit v1.2.1