summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDevarsh Thakkar <devarsh.thakkar@xilinx.com>2021-07-15 05:12:37 -0700
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-07-23 14:06:33 +0000
commitd2a7b763bef3ca51f0c84cdac52eeed85b0db8fb (patch)
tree1cdb6e5fd9f48878587f9242c410c7993eb47cb7 /sys
parente9d0d19f61ee9ec2eb5d3c29fc68a08b23539f72 (diff)
downloadgstreamer-plugins-bad-d2a7b763bef3ca51f0c84cdac52eeed85b0db8fb.tar.gz
kmssink: Fix fallback path for driver not able to scale scenario
When driver return error on update plane request, kmssink disables the scaling and retries plane update. While doing so kmssink was matching the source rectangle dimensions to the target rectangle dimensions which were calculated as per scaling but this is incorrect, instead what we want here is that target rectangle dimensions should match the source rectangle dimensions as scaling is disabled now and so we match result rectangle dimensions with source rectangle dimensions. While at it, also match the result rectangle coordinates for horizontal and vertical offsets with source rectange coordinates, as since there is no scaling being done so no recentering is required. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2415>
Diffstat (limited to 'sys')
-rw-r--r--sys/kms/gstkmssink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
index 5c68d8c65..10c561934 100644
--- a/sys/kms/gstkmssink.c
+++ b/sys/kms/gstkmssink.c
@@ -1654,8 +1654,10 @@ retry_set_plane:
/* to make sure it can be show when driver don't support scale */
if (!self->can_scale) {
- src.w = result.w;
- src.h = result.h;
+ result.w = src.w;
+ result.h = src.h;
+ result.x = src.x;
+ result.y = src.y;
}
GST_TRACE_OBJECT (self,