From 17715ac8ae4095cb12251c0f5f3ecb8d177e4b0e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 22 Feb 2012 15:25:03 +0100 Subject: [PATCH] x[v]imagesink: remove size check We can't to a size check like that, the strides might be different and the copy will then take care of that just fine. --- sys/ximage/ximagesink.c | 13 ------------- sys/xvimage/xvimagesink.c | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index f08eccbd9e..3a1faee126 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1322,9 +1322,6 @@ gst_ximagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf) if (res != GST_FLOW_OK) goto no_buffer; - if (gst_buffer_get_size (to_put) < gst_buffer_get_size (buf)) - goto wrong_size; - GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, ximagesink, "slow copy into bufferpool buffer %p", to_put); @@ -1365,16 +1362,6 @@ no_buffer: GST_WARNING_OBJECT (ximagesink, "could not create image"); return res; } -wrong_size: - { - GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE, - ("Failed to create output image buffer"), - ("XServer allocated buffer size did not match input buffer %" - G_GSIZE_FORMAT " - %" G_GSIZE_FORMAT, gst_buffer_get_size (to_put), - gst_buffer_get_size (buf))); - res = GST_FLOW_ERROR; - goto done; - } invalid_buffer: { /* No Window available to put our image into */ diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 523b73673b..e223f0c277 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1832,9 +1832,6 @@ gst_xvimagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf) if (res != GST_FLOW_OK) goto no_buffer; - if (gst_buffer_get_size (to_put) < gst_buffer_get_size (buf)) - goto wrong_size; - GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, xvimagesink, "slow copy into bufferpool buffer %p", to_put); @@ -1875,16 +1872,6 @@ no_buffer: GST_WARNING_OBJECT (xvimagesink, "could not create image"); return res; } -wrong_size: - { - GST_ELEMENT_ERROR (xvimagesink, RESOURCE, WRITE, - ("Failed to create output image buffer"), - ("XServer allocated buffer size did not match input buffer %" - G_GSIZE_FORMAT " - %" G_GSIZE_FORMAT, gst_buffer_get_size (to_put), - gst_buffer_get_size (buf))); - res = GST_FLOW_ERROR; - goto done; - } invalid_buffer: { /* No Window available to put our image into */