mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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>
This commit is contained in:
parent
e9d0d19f61
commit
d2a7b763be
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue