From: Julien Moutte Date: Mon, 14 Nov 2005 10:49:35 +0000 (+0000) Subject: gst/base/gstbasetransform.c: Ref the source pad caps while we need them. X-Git-Tag: RELEASE-0_9_6~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be483e517b6dd7575d8cd72b4e2b2d785c9235fe;p=platform%2Fupstream%2Fgstreamer.git gst/base/gstbasetransform.c: Ref the source pad caps while we need them. Original commit message from CVS: 2005-11-14 Julien MOUTTE * gst/base/gstbasetransform.c: (gst_base_transform_prepare_output_buf): Ref the source pad caps while we need them. Fixes (#321386) --- diff --git a/ChangeLog b/ChangeLog index d7f373c..62c3f4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-14 Julien MOUTTE + + * gst/base/gstbasetransform.c: + (gst_base_transform_prepare_output_buf): + Ref the source pad caps while we need them. + Fixes (#321386) + 2005-11-11 Wim Taymans * docs/gst/gstreamer-sections.txt: diff --git a/common b/common index 959da4a..c6e5de7 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 959da4a43c2e6218eb4f43e8c7e29c1db4157db1 +Subproject commit c6e5de72d79afdcad7d7b3cf4a35305f7f3ddebc diff --git a/gst/base/gstbasetransform.c b/gst/base/gstbasetransform.c index 4990af3..30cf351 100644 --- a/gst/base/gstbasetransform.c +++ b/gst/base/gstbasetransform.c @@ -809,6 +809,10 @@ gst_base_transform_prepare_output_buf (GstBaseTransform * trans, * the old buffer. We will therefore delay the reconfiguration of the * element until we have processed this last buffer. */ trans->delay_configure = TRUE; + /* out_caps is the caps of the src pad gathered through the GST_PAD_CAPS + macro. If a set_caps occurs during this function this caps will become + invalid. We want to keep them during preparation of the output buffer. */ + gst_caps_ref (out_caps); /* see if the subclass wants to alloc a buffer */ if (bclass->prepare_output_buffer) { @@ -869,6 +873,7 @@ gst_base_transform_prepare_output_buf (GstBaseTransform * trans, } done: + gst_caps_unref (out_caps); trans->delay_configure = FALSE; return ret; diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index 4990af3..30cf351 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -809,6 +809,10 @@ gst_base_transform_prepare_output_buf (GstBaseTransform * trans, * the old buffer. We will therefore delay the reconfiguration of the * element until we have processed this last buffer. */ trans->delay_configure = TRUE; + /* out_caps is the caps of the src pad gathered through the GST_PAD_CAPS + macro. If a set_caps occurs during this function this caps will become + invalid. We want to keep them during preparation of the output buffer. */ + gst_caps_ref (out_caps); /* see if the subclass wants to alloc a buffer */ if (bclass->prepare_output_buffer) { @@ -869,6 +873,7 @@ gst_base_transform_prepare_output_buf (GstBaseTransform * trans, } done: + gst_caps_unref (out_caps); trans->delay_configure = FALSE; return ret;