summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2007-07-20 16:09:03 +0000
committerMichael Smith <msmith@xiph.org>2007-07-20 16:09:03 +0000
commit11cf0dcd6b14c90091fdae5ca682447c1f2e470b (patch)
tree1f4d7cc8110884bb6ce7e5dbf851f38202488d4f /sys
parent9b2fb4d82481d79511a3cf2fcccb9673ce800b6b (diff)
sys/xvimage/xvimagesink.c: xcontext->im_format is only for testing XShm support (as the header file comments document...
Original commit message from CVS: * 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.
Diffstat (limited to 'sys')
-rw-r--r--sys/xvimage/xvimagesink.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 4a5dff13..0e486349 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;