/* Allocate the memory needed to store the decoder's structure */
p_dec->p_sys = p_sys = malloc( sizeof( *p_sys ) );
if( p_sys == NULL )
- {
- msg_Err( p_dec, "out of memory" );
return VLC_ENOMEM;
- }
/* init of p_sys */
memset( p_sys, 0, sizeof( *p_sys ) );
****************************************************************************/
static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
- subpicture_t *p_spu = NULL;
+ subpicture_t *p_spu;
+ block_t *p_block;
+
+ if( !pp_block || *pp_block == NULL )
+ return NULL;
- if( !pp_block || *pp_block == NULL ) return NULL;
+ p_block = *pp_block;
+ if( p_block->i_rate != 0 )
+ p_block->i_length = p_block->i_length * p_block->i_rate / INPUT_RATE_DEFAULT;
- p_spu = ParseText( p_dec, *pp_block );
+ p_spu = ParseText( p_dec, p_block );
- block_Release( *pp_block );
+ block_Release( p_block );
*pp_block = NULL;
return p_spu;
continue;
if( p_sys->pp_images[i]->p_pic )
- p_sys->pp_images[i]->p_pic->pf_release( p_sys->pp_images[i]->p_pic );
+ picture_Release( p_sys->pp_images[i]->p_pic );
free( p_sys->pp_images[i]->psz_filename );
free( p_sys->pp_images[i] );