tk->psz_codec = NULL;
tk->b_dts_only = false;
tk->i_default_duration = 0;
+ tk->b_no_duration = false;
tk->f_timecodescale = 1.0;
tk->b_inited = false;
else if( !strcmp( p_tk->psz_codec, "S_VOBSUB" ) )
{
p_tk->fmt.i_codec = VLC_CODEC_SPU;
+ p_tk->b_no_duration = true;
if( p_tk->i_extra_data )
{
char *psz_start;
VLC_TS_INVALID;
continue;
}
- case VLC_CODEC_SPU:
- if( strcmp( tk->psz_codec, "S_VOBSUB" ) )
- p_block->i_length = i_duration * tk-> f_timecodescale *
- (double) p_segment->i_timescale / 1000.0;
- break;
case VLC_CODEC_OPUS:
if( i_duration > 0 )
{
#if 0
msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_block->i_pts);
#endif
+ if( !tk->b_no_duration )
+ {
+ p_block->i_length = i_duration * tk-> f_timecodescale *
+ (double) p_segment->i_timescale / 1000.0;
+ }
+
/* FIXME remove when VLC_TS_INVALID work is done */
if( i == 0 || p_block->i_dts > VLC_TS_INVALID )
p_block->i_dts += VLC_TS_0;