[vlc-devel] [PATCH 32/34] mkv: removed EbmlParser::UnGet

Filip Roséen filip at videolabs.io
Fri May 6 19:09:11 CEST 2016


This function is never called, and it will probably never be in the
future.
---
 modules/demux/mkv/Ebml_parser.cpp | 38 --------------------------------------
 modules/demux/mkv/Ebml_parser.hpp |  1 -
 2 files changed, 39 deletions(-)

diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index d0abab7..822c1c7 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -77,44 +77,6 @@ void EbmlParser::reconstruct( EbmlStream* es, EbmlElement* el_start, demux_t* p_
     );
 }
 
-EbmlElement* EbmlParser::UnGet( uint64 i_block_pos, uint64 i_cluster_pos )
-{
-    if ( mi_user_level > mi_level )
-    {
-        while ( mi_user_level != mi_level )
-        {
-            delete m_el[mi_user_level];
-            m_el[mi_user_level] = NULL;
-            mi_user_level--;
-        }
-    }
-
-    /* Avoid data skip in BlockGet */
-    delete m_el[mi_level];
-    m_el[mi_level] = NULL;
-
-    m_got = NULL;
-    mb_keep = false;
-    if ( m_el[1] && m_el[1]->GetElementPosition() == i_cluster_pos )
-    {
-        m_es->I_O().setFilePointer( i_block_pos, seek_beginning );
-        return m_el[1];
-    }
-    else
-    {
-        // seek to the previous Cluster
-        m_es->I_O().setFilePointer( i_cluster_pos, seek_beginning );
-        while(mi_level > 1)
-        {
-            mi_level--;
-            mi_user_level--;
-            delete m_el[mi_level];
-            m_el[mi_level] = NULL;
-        }
-        return NULL;
-    }
-}
-
 void EbmlParser::Up( void )
 {
     if( mi_user_level == mi_level && m_el[mi_level] )
diff --git a/modules/demux/mkv/Ebml_parser.hpp b/modules/demux/mkv/Ebml_parser.hpp
index 596e7ec..320b1f5 100644
--- a/modules/demux/mkv/Ebml_parser.hpp
+++ b/modules/demux/mkv/Ebml_parser.hpp
@@ -46,7 +46,6 @@ class EbmlParser
     EbmlElement *Get( int n_call = 0 );
     void        Keep( void );
     void        Unkeep( void );
-    EbmlElement *UnGet( uint64 i_block_pos, uint64 i_cluster_pos );
 
     int  GetLevel( void ) const;
 
-- 
2.8.2



More information about the vlc-devel mailing list