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.
This commit is contained in:
Joshua N. Pritikin 2003-07-23 08:20:24 +00:00
parent 45b32a854f
commit 1778cae1a7

View file

@ -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);
}