diff --git a/modules/codec/webvtt/subsvtt.c b/modules/codec/webvtt/subsvtt.c index 6d5c157b29e58070e5420c98843e3af175820ace..33ecf00a8e94ccbb2de1cd9ded3528db16b5e61d 100644 --- a/modules/codec/webvtt/subsvtt.c +++ b/modules/codec/webvtt/subsvtt.c @@ -1463,12 +1463,12 @@ static int GetCueTextAlignment( const webvtt_dom_cue_t *p_cue ) return SUBPICTURE_ALIGN_LEFT; case WEBVTT_ALIGN_RIGHT: return SUBPICTURE_ALIGN_RIGHT; - case WEBVTT_ALIGN_START: - return ((p_cue->settings.vertical == WEBVTT_ALIGN_RIGHT) ? - SUBPICTURE_ALIGN_LEFT : SUBPICTURE_ALIGN_RIGHT); - case WEBVTT_ALIGN_END: - return ((p_cue->settings.vertical == WEBVTT_ALIGN_RIGHT)) ? + case WEBVTT_ALIGN_START: /* vertical provides rl or rl base direction */ + return (p_cue->settings.vertical == WEBVTT_ALIGN_RIGHT) ? SUBPICTURE_ALIGN_RIGHT : SUBPICTURE_ALIGN_LEFT; + case WEBVTT_ALIGN_END: + return (p_cue->settings.vertical == WEBVTT_ALIGN_RIGHT) ? + SUBPICTURE_ALIGN_LEFT : SUBPICTURE_ALIGN_RIGHT; default: return 0; }