+2005-08-03 Andy Wingo <wingo@pobox.com>
+
+ * sys/ximage/ximagesink.c (gst_ximagesink_renegotiate_size):
+ (gst_ximagesink_buffer_alloc):
+ Protect the height, width, and desired_caps with the pool_lock.
+ Fixes videotestsrc ! queue ! ximagesink.
+
2005-08-02 Edward Hervey <edward@fluendo.com>
* gst/volume/gstvolume.c:
}
if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (ximagesink), caps)) {
+ g_mutex_lock (ximagesink->pool_lock);
+
gst_caps_replace (&ximagesink->desired_caps, caps);
GST_VIDEO_SINK_WIDTH (ximagesink) = ximagesink->xwindow->width;
GST_VIDEO_SINK_HEIGHT (ximagesink) = ximagesink->xwindow->height;
+ g_mutex_unlock (ximagesink->pool_lock);
+
if (ximagesink->ximage) {
GST_DEBUG_OBJECT (ximagesink, "destroying and recreating our ximage");
gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage);
}
}
- g_mutex_unlock (ximagesink->pool_lock);
-
if (!ximage) {
/* We found no suitable image in the pool. Creating... */
gint height, width;
if (ximagesink->desired_caps)
gst_buffer_set_caps (GST_BUFFER (ximage), ximagesink->desired_caps);
else
+ /* fixme we have no guarantee that the ximage is actually of these caps,
+ do we? */
gst_buffer_set_caps (GST_BUFFER (ximage), caps);
}
+ g_mutex_unlock (ximagesink->pool_lock);
+
*buf = GST_BUFFER (ximage);
return GST_FLOW_OK;