<p>Hugo Beauzée-Luyseen found an off-by-one error in the patch in which this email is a reply to, see attachment for one that has fixed this issue.</p>
<p>The new patch effectively differs (in terms of result) from the previous patch in the following way:</p>
<pre><code>index 01ba53a..c49ddb0 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -848,7 +848,7 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
EbmlElement *el = NULL;
/* Start from the last known index instead of the beginning eachtime */
- if(index_idx())
+ if(index_idx() == 0)
es.I_O().setFilePointer( i_start_pos, seek_beginning );
else
es.I_O().setFilePointer( prev_index().i_position,
@@ -864,7 +864,7 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
{
cluster = kc_ptr;
i_cluster_pos = cluster->GetElementPosition();
- if( index_idx() ||
+ if( index_idx() == 0 ||
( prev_index().i_position < (int64_t)cluster->GetElementPosition() ) )
{
ParseCluster( cluster, false, SCOPE_NO_DATA );
@@ -1424,7 +1424,7 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
cluster->InitTimecode( uint64( *kct_ptr ), i_timescale );
/* add it to the index */
- if( index_idx() ||
+ if( index_idx() == 0 ||
( prev_index().i_position < (int64_t)cluster->GetElementPosition() ) )
{
IndexAppendCluster( cluster );</code></pre>
<p>Thanks Hugo!</p>