[vlc-devel] [PATCH 4/5] change common decoders

Aaron Wang hughwung at gmail.com
Wed Sep 23 10:18:03 CEST 2015


---
 modules/codec/subsdec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index 1c9df6f..21dc53e 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -631,7 +631,10 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
 
     subpicture_updater_sys_t *p_spu_sys = p_spu->updater.p_sys;
 
-    p_spu_sys->align = SUBPICTURE_ALIGN_BOTTOM | p_sys->i_align;
+    int i_align = SUBPICTURE_ALIGN_BOTTOM;
+    if(p_dec->fmt_in.subs.i_ord == 1)
+        i_align = SUBPICTURE_ALIGN_TOP;
+    p_spu_sys->align = i_align | p_sys->i_align;
     p_spu_sys->p_segments = ParseSubtitles( &p_spu_sys->align, psz_subtitle );
 
     free( psz_subtitle );
-- 
1.9.1



More information about the vlc-devel mailing list