rem: else if (!vw->priv->auto_resize) {   if (	(vw->priv->source_width) && (vw->priv->source_height) && (GDK_IS_WINDOW(vw->priv->video_window)) ) { width_ratio = (gfloat) allocation->width / (gfloat) vw->priv->source_width; height_ratio = (gfloat) allocation->height / (gfloat) vw->priv->source_height;  scale_factor = MIN (width_ratio, height_ratio); }
add: } else { scale_factor = 1.0; }    temp = (scale_factor * vw->priv->source_width + 0.5); width = (gint) temp > G_MAXINT ? G_MAXINT : (gint) temp; temp = (scale_factor * vw->priv->source_height + 0.5); height = (gint) temp > G_MAXINT ? G_MAXINT : (gint) temp;   if (vw->priv->auto_resize) { if (width < vw->priv->width_mini) { allocation->width = vw->priv->width_mini;
context: gst_video_widget_allocate (GtkWidget *widget, GtkAllocation *allocation){	GstVideoWidget *vw;	gfloat width_ratio, height_ratio, temp, scale_factor = 1.0;	guint width, height;	g_return_if_fail(widget != NULL);	g_return_if_fail(GST_IS_VIDEO_WIDGET(widget));		vw = GST_VIDEO_WIDGET (widget);		/* Choosing best ratio */		if (vw->priv->scale_override) {		scale_factor = vw->priv->scale_factor;	}	else if (!vw->priv->auto_resize) {				/* Ratio get impacted only if video window loaded */		if (	(vw->priv->source_width) &&				(vw->priv->source_height) &&				(GDK_IS_WINDOW(vw->priv->video_window)) )		{			width_ratio = (gfloat) allocation->width /							(gfloat) vw->priv->source_width;			height_ratio = (gfloat) allocation->height /							(gfloat) vw->priv->source_height;				scale_factor = MIN (width_ratio, height_ratio);		}	}	else {		scale_factor = 1.0;	}		/* Calculating width & height with optimal ratio */		temp = (scale_factor * vw->priv->source_width + 0.5);	width = (gint) temp > G_MAXINT ? G_MAXINT : (gint) temp;	temp = (scale_factor * vw->priv->source_height + 0.5);	height = (gint) temp > G_MAXINT ? G_MAXINT : (gint) temp;	/* If auto resize is set we check that video size is	bigger than minimum size */	if (vw->priv->auto_resize) {		if (width < vw->priv->width_mini) {			allocation->width = vw->priv->width_mini;		}		else {			allocation->width = width;		}		if (height < vw->priv->height_mini) {			allocation->height = vw->priv->height_mini;		}		else {			allocation->height = height;		}	} /* If not auto resizing we check that allocation is bigger */	else { /* than minimum size */		if (allocation->width < vw->priv->width_mini)			allocation->width = vw->priv->width_mini;		if (allocation->height < vw->priv->height_mini)			allocation->height = vw->priv->height_mini;	}		widget->allocation = *allocation;		if (GTK_WIDGET_REALIZED (widget)) {		gdk_window_move_resize (	widget->window,									allocation->x, 									allocation->y,									allocation->width, 									allocation->height);				if (GDK_IS_WINDOW(vw->priv->event_window))			gdk_window_move_resize (	vw->priv->event_window,										0, 										0,										allocation->width, 										allocation->height);				if (GDK_IS_WINDOW(vw->priv->video_window)) {			gint video_x, video_y;									video_x = (allocation->width / 2) - (width / 2);			video_y = (allocation->height / 2) - (height / 2);								gdk_window_move_resize (							vw->priv->video_window,							video_x, 							video_y,							width, 							height);		}    }}