if (!get_drm_caps (self))
goto bail;
+ self->can_scale = TRUE;
+
res = drmModeGetResources (self->fd);
if (!res)
goto resources_failed;
dst.w = self->hdisplay;
dst.h = self->vdisplay;
- gst_video_sink_center_rect (src, dst, &result, TRUE);
+retry_set_plane:
+ gst_video_sink_center_rect (src, dst, &result, self->can_scale);
if (crop) {
src.w = crop->width;
result.x, result.y, result.w, result.h,
/* source/cropping coordinates are given in Q16 */
src.x << 16, src.y << 16, src.w << 16, src.h << 16);
- if (ret)
+ if (ret) {
+ if (self->can_scale) {
+ self->can_scale = FALSE;
+ goto retry_set_plane;
+ }
goto set_plane_failed;
+ }
sync_frame:
/* Wait for the previous frame to complete redraw */