sys/xvimage/xvimagesink.c: Refuse to create an XvImage if we can't find the format.

Original commit message from CVS:
2005-11-28  Julien MOUTTE  <julien@moutte.net>

* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new):
Refuse to create an XvImage if we can't find the format.
This commit is contained in:
Julien Moutte 2005-11-28 10:43:26 +00:00
parent b80fd557a2
commit 390aa5ec7c
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-11-28 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new):
Refuse to create an XvImage if we can't find the format.
2005-11-28 Edward Hervey <edward@fluendo.com>
* gst-libs/gst/riff/riff-media.c:

View file

@ -456,11 +456,11 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
GST_LOG_OBJECT (xvimagesink, "creating %dx%d", xvimage->width,
xvimage->height);
/* We should probably get that from the caps as well */
xvimage->im_format = gst_xvimagesink_get_format_from_caps (xvimagesink, caps);
if (!xvimage->im_format) {
GST_WARNING_OBJECT (xvimagesink, "failed to get format from caps %"
GST_PTR_FORMAT, caps);
goto beach_unlocked;
}
xvimage->xvimagesink = gst_object_ref (xvimagesink);
@ -533,6 +533,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
beach:
g_mutex_unlock (xvimagesink->x_lock);
beach_unlocked:
if (!succeeded) {
gst_xvimage_buffer_free (xvimage);
xvimage = NULL;