+2005-11-28 Julien MOUTTE <julien@moutte.net>
+
+ * sys/ximage/ximagesink.c: (gst_ximagesink_ximage_put),
+ (gst_ximagesink_setcaps):
+ * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put),
+ (gst_xvimagesink_setcaps): Fixed a tricky bug. When caps renegotiation
+ happens (only visible on ximagesink but bug is in xv too) set_caps was
+ destroying the internal x[v]image used to memcpy non locally alloced
+ buffers so that it got renewed on next _chain. The issue is that
+ _expose will try to put that image as it reffed it in _put.
+ Using gst_buffer_unref instead of destroy fixes it !
+
2005-11-28 Edward Hervey <edward@fluendo.com>
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
-Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67
+Subproject commit f31468e933b5b980398cf636a37abf16ca46c4a0
GST_DEBUG_OBJECT (ximagesink, "unreffing %p", ximagesink->cur_image);
gst_buffer_unref (ximagesink->cur_image);
}
+ GST_DEBUG_OBJECT (ximagesink, "reffing %p as our current image", ximage);
ximagesink->cur_image = GST_XIMAGE_BUFFER (gst_buffer_ref (ximage));
}
if ((ximagesink->ximage) &&
((GST_VIDEO_SINK_WIDTH (ximagesink) != ximagesink->ximage->width) ||
(GST_VIDEO_SINK_HEIGHT (ximagesink) != ximagesink->ximage->height))) {
- gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage);
+ GST_DEBUG_OBJECT (ximagesink, "our image is not usable anymore, unref %p",
+ ximagesink->ximage);
+ gst_buffer_unref (GST_BUFFER (ximagesink->ximage));
ximagesink->ximage = NULL;
}
GST_DEBUG_OBJECT (xvimagesink, "unreffing %p", xvimagesink->cur_image);
gst_buffer_unref (xvimagesink->cur_image);
}
+ GST_DEBUG_OBJECT (xvimagesink, "reffing %p as our current image", xvimage);
xvimagesink->cur_image = GST_XVIMAGE_BUFFER (gst_buffer_ref (xvimage));
}
GST_FOURCC_ARGS (xvimagesink->xcontext->im_format),
GST_FOURCC_ARGS (im_format));
GST_DEBUG_OBJECT (xvimagesink, "renewing xvimage");
- gst_xvimage_buffer_free (xvimagesink->xvimage);
+ gst_buffer_unref (GST_BUFFER (xvimagesink->xvimage));
xvimagesink->xvimage = NULL;
}