[vlc-devel] [PATCH 12/13] change subsdec to make it recognize field i_ord we set, so it processes the 2nd sub differently

Aaron Wang hughwung at gmail.com
Wed Sep 16 15:49:50 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