[vlc-commits] [Git][videolan/vlc][master] xcb/x11: apply the new input format during reset_picture
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Oct 17 07:50:30 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
bb19843d by Steve Lhomme at 2023-10-17T07:33:13+00:00
xcb/x11: apply the new input format during reset_picture
If for some reason the core decides not to call reset_pictures we should
assume things will not change.
- - - - -
1 changed file:
- modules/video_output/xcb/x11.c
Changes:
=====================================
modules/video_output/xcb/x11.c
=====================================
@@ -190,6 +190,19 @@ static void Display (vout_display_t *vd, picture_t *pic)
static int ResetPictures(vout_display_t *vd, video_format_t *fmt)
{
vout_display_sys_t *sys = vd->sys;
+ video_format_t src;
+
+ vout_display_PlacePicture(&sys->place, vd->source, &vd->cfg->display);
+
+ video_format_ApplyRotation(&src, vd->source);
+ sys->fmt.i_width = src.i_width * sys->place.width / src.i_visible_width;
+ sys->fmt.i_height = src.i_height * sys->place.height / src.i_visible_height;
+
+ sys->fmt.i_visible_width = sys->place.width;
+ sys->fmt.i_visible_height = sys->place.height;
+ sys->fmt.i_x_offset = src.i_x_offset * sys->place.width / src.i_visible_width;
+ sys->fmt.i_y_offset = src.i_y_offset * sys->place.height / src.i_visible_height;
+
*fmt = sys->fmt;
return VLC_SUCCESS;
}
@@ -213,26 +226,15 @@ static int Control(vout_display_t *vd, int query)
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
{
- video_format_t src, *fmt = &sys->fmt;
- vout_display_place_t *place = &sys->place;
- int ret = VLC_SUCCESS;
+ vout_display_place_t place;
- vout_display_PlacePicture(place, vd->source, &vd->cfg->display);
+ vout_display_PlacePicture(&place, vd->source, &vd->cfg->display);
- if (place->width != sys->fmt.i_visible_width
- || place->height != sys->fmt.i_visible_height)
- ret = VLC_EGENERIC;
+ if (place.width != sys->fmt.i_visible_width
+ || place.height != sys->fmt.i_visible_height)
+ return VLC_EGENERIC;
- video_format_ApplyRotation(&src, vd->source);
- fmt->i_width = src.i_width * place->width / src.i_visible_width;
- fmt->i_height = src.i_height * place->height / src.i_visible_height;
-
- fmt->i_visible_width = place->width;
- fmt->i_visible_height = place->height;
- fmt->i_x_offset = src.i_x_offset * place->width / src.i_visible_width;
- fmt->i_y_offset = src.i_y_offset * place->height / src.i_visible_height;
-
- return ret;
+ return VLC_SUCCESS;
}
default:
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bb19843d463a691be2333ef790f8da22fcdec5f1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bb19843d463a691be2333ef790f8da22fcdec5f1
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list