vlc | branch: master | Mark Lee <mark....@capricasoftware.co.uk> | Sat May 24 13:00:24 2014 +0100| [c6b8b1b5022e2e701def97e02975814c9ad95942] | committer: Rémi Denis-Courmont
lib: use explicit array initialisation syntax for position table Also use unsigned char rather than int as the type Signed-off-by: Rémi Denis-Courmont <r...@remlab.net> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6b8b1b5022e2e701def97e02975814c9ad95942 --- lib/media_player.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/media_player.c b/lib/media_player.c index e244bc0..4477a6a 100644 --- a/lib/media_player.c +++ b/lib/media_player.c @@ -1450,16 +1450,16 @@ void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi ) * Private lookup table to get subpicture alignment flag values corresponding * to a libvlc_position_t enumerated value. */ -static const int position_subpicture_alignment[] = { - 0, - SUBPICTURE_ALIGN_LEFT, - SUBPICTURE_ALIGN_RIGHT, - SUBPICTURE_ALIGN_TOP, - SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_LEFT, - SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_RIGHT, - SUBPICTURE_ALIGN_BOTTOM, - SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_LEFT, - SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_RIGHT +static const unsigned char position_subpicture_alignment[] = { + [libvlc_position_center] = 0, + [libvlc_position_left] = SUBPICTURE_ALIGN_LEFT, + [libvlc_position_right] = SUBPICTURE_ALIGN_RIGHT, + [libvlc_position_top] = SUBPICTURE_ALIGN_TOP, + [libvlc_position_top_left] = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_LEFT, + [libvlc_position_top_right] = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_RIGHT, + [libvlc_position_bottom] = SUBPICTURE_ALIGN_BOTTOM, + [libvlc_position_bottom_left] = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_LEFT, + [libvlc_position_bottom_right] = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_RIGHT }; void libvlc_media_player_set_video_title_display( libvlc_media_player_t *p_mi, libvlc_position_t position, unsigned timeout ) _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits