diff --git a/ChangeLog b/ChangeLog index e18f28f4c1..ac88c6e42d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-20 Michael Smith + + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new), + (gst_xvimagesink_get_xv_support), (gst_xvimagesink_setcaps): + xcontext->im_format is only for testing XShm support (as the header + file comments document). Use xvimage->im_format for everything else. + Avoids spurious warnings on buffer allocation before setcaps. + 2007-07-20 Stefan Kost * tests/examples/volume/Makefile.am: diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 4a5dff139c..0e48634967 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -571,7 +571,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps) /* calculate the expected size. This is only for sanity checking the * number we get from X. */ - switch (xvimagesink->xcontext->im_format) { + switch (xvimage->im_format) { case GST_MAKE_FOURCC ('I', '4', '2', '0'): expected_size = GST_ROUND_UP_2 (xvimage->height) * GST_ROUND_UP_4 (xvimage->width); @@ -1411,9 +1411,8 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink, GstCaps *format_caps = NULL; gboolean is_rgb_format = FALSE; - /* We set the image format of the xcontext to an existing one. Sink - connect method will override that but we need to have at least a - valid image format so that we can make our xshm calls check before + /* We set the image format of the xcontext to an existing one. This + is just some valid image format for making our xshm calls check before caps negotiation really happens. */ xcontext->im_format = formats[i].id; @@ -2041,15 +2040,13 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps) (video_height != xvimagesink->xvimage->height))) { GST_DEBUG_OBJECT (xvimagesink, "old format %" GST_FOURCC_FORMAT ", new format %" GST_FOURCC_FORMAT, - GST_FOURCC_ARGS (xvimagesink->xcontext->im_format), + GST_FOURCC_ARGS (xvimagesink->xvimage->im_format), GST_FOURCC_ARGS (im_format)); GST_DEBUG_OBJECT (xvimagesink, "renewing xvimage"); gst_buffer_unref (GST_BUFFER (xvimagesink->xvimage)); xvimagesink->xvimage = NULL; } - xvimagesink->xcontext->im_format = im_format; - g_mutex_unlock (xvimagesink->flow_lock); return TRUE;