Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
18dbd3ac
Commit
18dbd3ac
authored
Apr 30, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: EbmlParser, cleanup
parent
285e9726
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
22 deletions
+18
-22
modules/demux/mkv/Ebml_parser.cpp
modules/demux/mkv/Ebml_parser.cpp
+6
-22
modules/demux/mkv/Ebml_parser.hpp
modules/demux/mkv/Ebml_parser.hpp
+12
-0
No files found.
modules/demux/mkv/Ebml_parser.cpp
View file @
18dbd3ac
/*****************************************************************************
*
mkv.cpp :
matroska demuxer
*
EbmlParser for the
matroska demuxer
*****************************************************************************
* Copyright (C) 2003-2004 the VideoLAN team
* $Id$
...
...
@@ -22,6 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "Ebml_parser.hpp"
/*****************************************************************************
...
...
@@ -29,14 +30,12 @@
*****************************************************************************/
EbmlParser
::
EbmlParser
(
EbmlStream
*
es
,
EbmlElement
*
el_start
,
demux_t
*
p_demux
)
{
int
i
;
m_es
=
es
;
m_got
=
NULL
;
m_el
[
0
]
=
el_start
;
mi_remain_size
[
0
]
=
el_start
->
GetSize
();
for
(
i
=
1
;
i
<
6
;
i
++
)
for
(
i
nt
i
=
1
;
i
<
6
;
i
++
)
{
m_el
[
i
]
=
NULL
;
}
...
...
@@ -48,9 +47,7 @@ EbmlParser::EbmlParser( EbmlStream *es, EbmlElement *el_start, demux_t *p_demux
EbmlParser
::~
EbmlParser
(
void
)
{
int
i
;
for
(
i
=
1
;
i
<
mi_level
;
i
++
)
for
(
int
i
=
1
;
i
<
mi_level
;
i
++
)
{
if
(
!
mb_keep
)
{
...
...
@@ -94,7 +91,7 @@ void EbmlParser::Up( void )
{
if
(
mi_user_level
==
mi_level
)
{
fprintf
(
stderr
,
"
arrrrrrrrrrrrrg
Up cannot escape itself
\n
"
);
fprintf
(
stderr
,
"
MKV/Ebml Parser:
Up cannot escape itself
\n
"
);
}
mi_user_level
--
;
...
...
@@ -130,18 +127,6 @@ void EbmlParser::Reset( demux_t *p_demux )
mb_dummy
=
var_InheritInteger
(
p_demux
,
"mkv-use-dummy"
);
}
/* This function workarounds a bug in KaxBlockVirtual implementation */
class
KaxBlockVirtualWorkaround
:
public
KaxBlockVirtual
{
public:
void
Fix
()
{
if
(
Data
==
DataBlock
)
SetBuffer
(
NULL
,
0
);
}
};
EbmlElement
*
EbmlParser
::
Get
(
void
)
{
int
i_ulev
=
0
;
...
...
@@ -193,7 +178,7 @@ EbmlElement *EbmlParser::Get( void )
}
else
if
(
m_el
[
mi_level
]
==
NULL
)
{
fprintf
(
stderr
,
" m_el[mi_level] == NULL
\n
"
);
fprintf
(
stderr
,
"
MKV/Ebml Parser:
m_el[mi_level] == NULL
\n
"
);
}
return
m_el
[
mi_level
];
...
...
@@ -209,4 +194,3 @@ bool EbmlParser::IsTopPresent( EbmlElement *el )
return
false
;
}
modules/demux/mkv/Ebml_parser.hpp
View file @
18dbd3ac
...
...
@@ -26,6 +26,7 @@
#define _EBML_PARSER_HPP_
#include "mkv.hpp"
/*****************************************************************************
* Ebml Stream parser
*****************************************************************************/
...
...
@@ -60,4 +61,15 @@ class EbmlParser
bool
mb_dummy
;
};
/* This class works around a bug in KaxBlockVirtual implementation */
class
KaxBlockVirtualWorkaround
:
public
KaxBlockVirtual
{
public:
void
Fix
()
{
if
(
Data
==
DataBlock
)
SetBuffer
(
NULL
,
0
);
}
};
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment