[vlc-devel] [PATCH 25/30] mkv: removed matroska_segment_c::i_cluster_pos
Filip Roséen
filip at videolabs.io
Mon May 9 14:53:19 CEST 2016
This data-member serves no real purpose now that we do not require
EbmlParser::UnGet.
---
modules/demux/mkv/matroska_segment.cpp | 3 ---
modules/demux/mkv/matroska_segment.hpp | 1 -
modules/demux/mkv/matroska_segment_seeker.cpp | 14 +++++++-------
3 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index dd2289f..743a5f4 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -46,7 +46,6 @@ matroska_segment_c::matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estr
,i_attachments_position(-1)
,cluster(NULL)
,i_block_pos(0)
- ,i_cluster_pos(0)
,p_segment_uid(NULL)
,p_prev_segment_uid(NULL)
,p_next_segment_uid(NULL)
@@ -635,7 +634,6 @@ bool matroska_segment_c::Preload( )
cluster = kc_ptr;
- i_cluster_pos = cluster->GetElementPosition();
ParseCluster( cluster );
IndexAppendCluster( cluster );
@@ -1102,7 +1100,6 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
E_CASE( KaxCluster, kcluster )
{
vars.obj->cluster = &kcluster;
- vars.obj->i_cluster_pos = vars.obj->cluster->GetElementPosition();
vars.ep->Down ();
}
diff --git a/modules/demux/mkv/matroska_segment.hpp b/modules/demux/mkv/matroska_segment.hpp
index 4ee159a..c39c275 100644
--- a/modules/demux/mkv/matroska_segment.hpp
+++ b/modules/demux/mkv/matroska_segment.hpp
@@ -105,7 +105,6 @@ public:
KaxCluster *cluster;
uint64 i_block_pos;
- uint64 i_cluster_pos;
KaxSegmentUID *p_segment_uid;
KaxPrevUID *p_prev_segment_uid;
KaxNextUID *p_next_segment_uid;
diff --git a/modules/demux/mkv/matroska_segment_seeker.cpp b/modules/demux/mkv/matroska_segment_seeker.cpp
index 3d57561..6ca2a9d 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -357,8 +357,8 @@ SegmentSeeker::get_search_areas( fptr_t start, fptr_t end ) const
void
SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
{
- ms.cluster = NULL;
- ms.i_cluster_pos = -1;
+ fptr_t i_cluster_pos = -1;
+ ms.cluster = NULL;
{
cluster_positions_t::iterator cluster_it = greatest_lower_bound(
@@ -371,12 +371,12 @@ SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
while( ms.cluster == NULL || ms.cluster->GetEndPosition() < fpos )
{
- ms.cluster = static_cast<KaxCluster*>( ms.ep->Get() );
- ms.i_cluster_pos = ms.cluster->GetElementPosition();
+ ms.cluster = static_cast<KaxCluster*>( ms.ep->Get() );
+ i_cluster_pos = ms.cluster->GetElementPosition();
- add_cluster_position( ms.i_cluster_pos );
+ add_cluster_position( i_cluster_pos );
- mark_range_as_searched( Range( ms.i_cluster_pos, ms.es.I_O().getFilePointer() ) );
+ mark_range_as_searched( Range( i_cluster_pos, ms.es.I_O().getFilePointer() ) );
}
ms.ep->Down();
@@ -395,7 +395,7 @@ SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
/* TODO: add error handling; what if we never get a KaxCluster and/or KaxClusterTimecode? */
- mark_range_as_searched( Range( ms.i_cluster_pos, ms.es.I_O().getFilePointer() ) );
+ mark_range_as_searched( Range( i_cluster_pos, ms.es.I_O().getFilePointer() ) );
/* jump to desired position */
--
2.8.2
More information about the vlc-devel
mailing list