[vlc-commits] kva: zoom, fill change A/R, not display size
Rémi Denis-Courmont
git at videolan.org
Wed Dec 26 20:56:03 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 26 16:19:48 2018 +0200| [d98e93c5ff3798f536109dde12398b600ac8e2ee] | committer: Rémi Denis-Courmont
kva: zoom, fill change A/R, not display size
Changing the zoom and the fill flag is susceptible to changing the
intended "place" size, not the display size.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d98e93c5ff3798f536109dde12398b600ac8e2ee
---
modules/video_output/kva.c | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index fede443a0d..f319ccee2e 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -435,7 +435,6 @@ static int Control( vout_display_t *vd, int query, va_list args )
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
- case VOUT_DISPLAY_CHANGE_ZOOM:
{
const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *);
@@ -445,19 +444,21 @@ static int Control( vout_display_t *vd, int query, va_list args )
return VLC_SUCCESS;
}
+ case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
+ case VOUT_DISPLAY_CHANGE_ZOOM:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
- case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
{
- if( query == VOUT_DISPLAY_CHANGE_SOURCE_ASPECT )
- {
- vout_display_place_t place;
- vout_display_PlacePicture(&place, &vd->source, vd->cfg);
+ vout_display_place_t place;
+ vout_display_PlacePicture(&place, &vd->source, vd->cfg);
- sys->kvas.ulAspectWidth = place.width;
- sys->kvas.ulAspectHeight = place.height;
- }
- else
- {
+ sys->kvas.ulAspectWidth = place.width;
+ sys->kvas.ulAspectHeight = place.height;
+ kvaSetup( &sys->kvas );
+ return VLC_SUCCESS;
+ }
+
+ case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
+ {
video_format_t src_rot;
video_format_ApplyRotation(&src_rot, &vd->source);
@@ -468,16 +469,12 @@ static int Control( vout_display_t *vd, int query, va_list args )
sys->kvas.rclSrcRect.yBottom = src_rot.i_y_offset +
src_rot.i_visible_height;
}
-
kvaSetup( &sys->kvas );
-
return VLC_SUCCESS;
}
case VOUT_DISPLAY_RESET_PICTURES:
- case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
- /* TODO */
- break;
+ vlc_assert_unreachable();
}
msg_Err(vd, "Unsupported query(=%d) in vout display KVA", query);
More information about the vlc-commits
mailing list