diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c index 1331883ce4..3400d32440 100644 --- a/sys/kms/gstkmssink.c +++ b/sys/kms/gstkmssink.c @@ -414,7 +414,6 @@ configure_mode_setting (GstKMSSink * self, GstVideoInfo * vinfo) gboolean ret; drmModeConnector *conn; int err; - drmModeFB *fb; gint i; drmModeModeInfo *mode; guint32 fb_id; @@ -422,7 +421,6 @@ configure_mode_setting (GstKMSSink * self, GstVideoInfo * vinfo) ret = FALSE; conn = NULL; - fb = NULL; mode = NULL; kmsmem = NULL; @@ -440,13 +438,9 @@ configure_mode_setting (GstKMSSink * self, GstVideoInfo * vinfo) if (!conn) goto connector_failed; - fb = drmModeGetFB (self->fd, fb_id); - if (!fb) - goto framebuffer_failed; - for (i = 0; i < conn->count_modes; i++) { - if (conn->modes[i].vdisplay == fb->height && - conn->modes[i].hdisplay == fb->width) { + if (conn->modes[i].vdisplay == GST_VIDEO_INFO_HEIGHT (vinfo) && + conn->modes[i].hdisplay == GST_VIDEO_INFO_WIDTH (vinfo)) { mode = &conn->modes[i]; break; } @@ -464,8 +458,6 @@ configure_mode_setting (GstKMSSink * self, GstVideoInfo * vinfo) ret = TRUE; bail: - if (fb) - drmModeFreeFB (fb); if (conn) drmModeFreeConnector (conn); @@ -483,12 +475,6 @@ connector_failed: GST_ERROR_OBJECT (self, "Could not find a valid monitor connector"); goto bail; } -framebuffer_failed: - { - GST_ERROR_OBJECT (self, "drmModeGetFB failed: %s (%d)", - strerror (errno), errno); - goto bail; - } mode_failed: { GST_ERROR_OBJECT (self, "cannot find appropriate mode");