Index: libs/gst/base/gstbasetransform.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/libs/gst/base/gstbasetransform.c,v
retrieving revision 1.110
diff -u -p -a -u -p -r1.110 gstbasetransform.c
--- libs/gst/base/gstbasetransform.c 24 Mar 2008 16:44:25 -0000 1.110
+++ libs/gst/base/gstbasetransform.c 31 Mar 2008 10:03:39 -0000
@@ -973,15 +973,16 @@ gst_base_transform_prepare_output_buffer
gst_buffer_copy_metadata (*out_buf, in_buf,
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS);
-
- /* Unset the GAP flag if the element is _not_ GAP aware. Otherwise
- * it might create an output buffer that does not contain neutral data
- * but still has the GAP flag on it! */
- if (!trans->priv->gap_aware)
- GST_BUFFER_FLAG_UNSET (*out_buf, GST_BUFFER_FLAG_GAP);
}
done:
+
+ /* Unset the GAP flag if the element is _not_ GAP aware. Otherwise
+ * it might create an output buffer that does not contain neutral data
+ * but still has the GAP flag on it! */
+ if (gst_buffer_is_metadata_writable (*out_buf) && !trans->priv->gap_aware)
+ GST_BUFFER_FLAG_UNSET (*out_buf, GST_BUFFER_FLAG_GAP);
+
if (out_caps)
gst_caps_unref (out_caps);