Vobsub is working now. only track 0 will be played atm.
spudec scaling will need to be implemented or vobsub is pretty useless.
* modules/codec/spudec
Changed an error into a warning message.
* parse.c: SPU parser
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: parse.c,v 1.16 2003/11/24 00:39:01 fenrir Exp $
+ * $Id: parse.c,v 1.17 2004/01/27 22:51:39 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir@via.ecp.fr>
((p_sys->buffer[i_index+4]>>4)&0x0f);
p_spu->i_height = (((p_sys->buffer[i_index+4]&0x0f)<<8)|
p_sys->buffer[i_index+5]) - p_spu->i_y + 1;
-
+
i_index += 6;
break;
break;
default: /* xx (unknown command) */
- msg_Err( p_dec, "unknown command 0x%.2x", i_command );
+ msg_Warn( p_dec, "unknown command 0x%.2x", i_command );
return VLC_EGENERIC;
}
* spudec.c : SPU decoder thread
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: spudec.c,v 1.30 2003/11/22 23:39:14 fenrir Exp $
+ * $Id: spudec.c,v 1.31 2004/01/27 22:51:39 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir@via.ecp.fr>
if( p_sys->i_spu_size <= 0 && ( p_block->i_pts <= 0 || p_block->i_buffer < 4 ) )
{
msg_Dbg( p_dec, "invalid starting packet (size < 4 or pts <=0)" );
+ msg_Dbg( p_dec, "spu size: %d, i_pts: %d i_buffer: %d", p_sys->i_spu_size, p_block->i_pts, p_block->i_buffer );
block_Release( p_block );
return NULL;
}
* sub.c: subtitle demux for external subtitle files
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
- * $Id: sub.c,v 1.49 2004/01/27 13:10:29 fenrir Exp $
+ * $Id: sub.c,v 1.50 2004/01/27 22:51:39 hartman Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Derk-Jan Hartman <hartman at videolan dot org>
/* *** fix subtitle (order and time) *** */
p_sub->i_subtitle = 0; /* will be modified by sub_fix */
+
if( p_sub->i_sub_type != SUB_TYPE_VOBSUB )
{
sub_fix( p_sub );
if( i_size <= 0 ) i_size = 65535; /* Invalid or EOF */
/* Seek at the right place (could be avoid if sub_seek is fixed to do his job) */
- if( fseek( p_sub->p_vobsub_file, i_pos, SEEK_CUR ) )
+ if( fseek( p_sub->p_vobsub_file, i_pos, SEEK_SET ) )
{
msg_Warn( p_sub, "cannot seek at right vobsub location %d", i_pos );
p_sub->i_subtitle++;
i_spu = i_id&0x1f;
msg_Dbg( p_demux, "SPU track %d size %d", i_spu, i_size );
- if( p_demux->p_es )
+ /* FIXME i_spu == determines which of the spu tracks we will show. */
+ if( p_demux->p_es && i_spu == 0 )
{
p_pkt->i_pts = p_bk->i_pts;
es_out_Send( p_demux->p_input->p_es_out, p_demux->p_es, p_pkt );
p_bk->i_pts = 0; /* only first packet has a pts */
}
+ else
+ {
+ block_Release( p_pkt );
+ continue;
+ }
}
return VLC_SUCCESS;