[vlc-devel] commit: Correctly set order per subtitle decoder. (Laurent Aimar )

git version control git at videolan.org
Sun Sep 21 14:51:16 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Sep 21 14:00:20 2008 +0200| [90554602d2246d9645724a23f3f6fded04bc17b6] | committer: Laurent Aimar 

Correctly set order per subtitle decoder.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=90554602d2246d9645724a23f3f6fded04bc17b6
---

 src/input/decoder.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index c111d09..4b5714b 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -80,6 +80,7 @@ struct decoder_owner_sys_t
 
     vout_thread_t   *p_spu_vout;
     int              i_spu_channel;
+    int64_t          i_spu_order;
 
     sout_instance_t         *p_sout;
     sout_packetizer_input_t *p_sout_input;
@@ -476,6 +477,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
     p_dec->p_owner->p_vout = NULL;
     p_dec->p_owner->p_spu_vout = NULL;
     p_dec->p_owner->i_spu_channel = 0;
+    p_dec->p_owner->i_spu_order = 0;
     p_dec->p_owner->p_sout = p_sout;
     p_dec->p_owner->p_sout_input = NULL;
     p_dec->p_owner->p_packetizer = NULL;
@@ -1454,6 +1456,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec )
     {
         spu_Control( p_vout->p_spu, SPU_CHANNEL_REGISTER,
                      &p_sys->i_spu_channel );
+        p_sys->i_spu_order = 0;
         p_sys->p_spu_vout = p_vout;
     }
 
@@ -1461,6 +1464,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec )
     if( p_subpic )
     {
         p_subpic->i_channel = p_sys->i_spu_channel;
+        p_subpic->i_order = p_sys->i_spu_order++;
         p_subpic->b_subtitle = true;
     }
 




More information about the vlc-devel mailing list