[vlc-devel] [PATCH] Regression fix for non-SPU subtitles in MKV containers.
Ago Allikmaa
maxorator at gmail.com
Thu Nov 21 20:32:39 CET 2013
Patch (46fe18b280ed5825fd701edeedb2f5c24de001a2) caused block length
in BlockDecode to be set only for VLC_CODEC_SPU tracks instead of
all tracks as before. This broke other types of subtitle tracks (like SSA),
so I made that length setting occur for all types of subtitle tracks.
---
modules/demux/mkv/mkv.cpp | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 42f3334..6782959 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -602,11 +602,6 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
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 )
{
@@ -643,6 +638,13 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
tk->pi_chan_table, tk->fmt.i_codec );
}
+ else if( tk->fmt.i_cat == SPU_ES )
+ {
+ if( strcmp( tk->psz_codec, "S_VOBSUB" ) )
+ p_block->i_length = i_duration * tk-> f_timecodescale *
+ (double) p_segment->i_timescale / 1000.0;
+ }
+
p_block->i_dts = p_block->i_pts = i_pts;
}
else
--
1.8.4.2
More information about the vlc-devel
mailing list