Commit aa1ca803 authored by Laurent Aimar's avatar Laurent Aimar

* spudec: it also does the packetizer.

parent 82ca25cb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* spudec.c : SPU decoder thread * spudec.c : SPU decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: spudec.c,v 1.28 2003/11/22 19:55:47 fenrir Exp $ * $Id: spudec.c,v 1.29 2003/11/22 20:15:34 fenrir Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -49,7 +49,7 @@ vlc_module_begin(); ...@@ -49,7 +49,7 @@ vlc_module_begin();
add_submodule(); add_submodule();
set_description( _("DVD subtitles packetizer") ); set_description( _("DVD subtitles packetizer") );
set_capability( "decoder", 50 ); set_capability( "packetizer", 50 );
set_callbacks( PacketizerOpen, Close ); set_callbacks( PacketizerOpen, Close );
vlc_module_end(); vlc_module_end();
...@@ -193,6 +193,9 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block ) ...@@ -193,6 +193,9 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
if( p_spu ) if( p_spu )
{ {
p_spu->i_dts = p_spu->i_pts;
p_spu->i_length = 0;
/* reinit context */ /* reinit context */
p_sys->i_spu_size = 0; p_sys->i_spu_size = 0;
p_sys->i_rle_size = 0; p_sys->i_rle_size = 0;
...@@ -251,11 +254,10 @@ static block_t *Reassemble( decoder_t *p_dec, block_t **pp_block ) ...@@ -251,11 +254,10 @@ static block_t *Reassemble( decoder_t *p_dec, block_t **pp_block )
if( p_sys->i_spu >= p_sys->i_spu_size ) if( p_sys->i_spu >= p_sys->i_spu_size )
{ {
/* We have a complete sub */ /* We have a complete sub */
block_t *p_ret = p_sys->p_block;
msg_Dbg( p_dec, "SPU packets size=%d should be %d", msg_Dbg( p_dec, "SPU packets size=%d should be %d",
p_sys->i_spu, p_sys->i_spu_size ); p_sys->i_spu, p_sys->i_spu_size );
return p_ret;
return p_sys->p_block;
} }
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment