ges: fix frame position for sources with par > 1

A source with 1920x1080 and par 16:15 has a natural size of
2048x1080. The current code is incorrectly setting the natural
width as height resulting in 1920x2048.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8693>
This commit is contained in:
Andoni Morales Alastruey 2025-03-26 11:38:56 +01:00 committed by GStreamer Marge Bot
parent 5bd36c694c
commit 05347a3c03

@ -126,7 +126,7 @@ ges_video_uri_source_get_natural_size (GESVideoSource * source, gint * width,
if (*height % par_n == 0) {
*height = gst_util_uint64_scale_int (*height, par_d, par_n);
} else if (*width % par_d == 0) {
*height = gst_util_uint64_scale_int (*width, par_n, par_d);
*width = gst_util_uint64_scale_int (*width, par_n, par_d);
} else {
*width = gst_util_uint64_scale_int (*height, par_d, par_n);
}