Commit be6ca153 authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Make b_ephemer conditional on (i_timeout == 0) and added some debugging.

parent 1ac587f1
......@@ -1461,10 +1461,16 @@ static subpicture_t *render( decoder_t *p_dec )
/* Set the pf_render callback */
p_spu->i_start = p_sys->i_pts;
p_spu->i_stop = p_spu->i_start + (mtime_t) (i_timeout * 1000000);
p_spu->b_ephemer = VLC_TRUE;
p_spu->i_stop = (i_timeout == 0) ? (mtime_t) 0
: p_spu->i_start + (mtime_t) (i_timeout * 1000000);
p_spu->b_ephemer = (i_timeout == 0) ? VLC_TRUE : VLC_FALSE;
p_spu->b_fade = VLC_TRUE;
#ifdef DEBUG_DVBSUB
msg_Dbg( p_dec, "rendering start time "I64Fd" stop time "I64Fd" timeout %d",
p_spu->i_start, p_spu->i_stop, i_timeout );
#endif
/* Correct positioning of SPU */
p_spu->b_absolute = p_sys->b_absolute;
p_spu->i_flags = p_sys->i_spu_position;
......@@ -1839,10 +1845,12 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
bs_write( s, 8, 0xff );/* End marker */
p_block->i_buffer = bs_pos( s ) / 8;
p_block->i_pts = p_block->i_dts = p_subpic->i_start;
if( !p_subpic->b_ephemer && p_subpic->i_stop > p_subpic->i_start )
if( !p_subpic->b_ephemer && (p_subpic->i_stop > p_subpic->i_start) )
{
block_t *p_block_stop;
#ifdef DEBUG_DVBSUB
msg_Dbg( p_enc, "sending end of display signal" );
#endif
p_block->i_length = p_subpic->i_stop - p_subpic->i_start;
/* Send another (empty) subtitle to signal the end of display */
......@@ -1877,7 +1885,6 @@ static void CloseEncoder( vlc_object_t *p_this )
var_Destroy( p_this , ENC_CFG_PREFIX "x" );
var_Destroy( p_this , ENC_CFG_PREFIX "y" );
var_Destroy( p_this , ENC_CFG_PREFIX "timeout" );
if( p_sys->i_regions ) free( p_sys->p_regions );
free( p_sys );
......
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