gst/base/gstbasetransform.c: Ref the source pad caps while we need them.
authorJulien Moutte <julien@moutte.net>
Mon, 14 Nov 2005 10:49:35 +0000 (10:49 +0000)
committerJulien Moutte <julien@moutte.net>
Mon, 14 Nov 2005 10:49:35 +0000 (10:49 +0000)
Original commit message from CVS:
2005-11-14  Julien MOUTTE  <julien@moutte.net>

* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
Ref the source pad caps while we need them.
Fixes (#321386)

ChangeLog
common
gst/base/gstbasetransform.c
libs/gst/base/gstbasetransform.c

index d7f373c..62c3f4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-14  Julien MOUTTE  <julien@moutte.net>
+
+       * 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  <wim@fluendo.com>
 
        * docs/gst/gstreamer-sections.txt:
diff --git a/common b/common
index 959da4a..c6e5de7 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 959da4a43c2e6218eb4f43e8c7e29c1db4157db1
+Subproject commit c6e5de72d79afdcad7d7b3cf4a35305f7f3ddebc
index 4990af3..30cf351 100644 (file)
@@ -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;
index 4990af3..30cf351 100644 (file)
@@ -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;