Commit 5567d4df authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MKV: cosmetics and NULL-check

parent 8ae8da34
......@@ -51,7 +51,6 @@ demux_sys_t::~demux_sys_t()
matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlStream *p_estream, bool b_initial )
{
int i_upper_lvl = 0;
size_t i;
EbmlElement *p_l0, *p_l1, *p_l2;
bool b_keep_stream = false, b_keep_segment;
......@@ -112,7 +111,7 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
KaxInfo *p_info = static_cast<KaxInfo*>(p_l1);
p_info->Read(*p_estream, KaxInfo::ClassInfos.Context, i_upper_lvl, p_l2, true);
for( i = 0; i < p_info->ListSize(); i++ )
for( size_t i = 0; i < p_info->ListSize(); i++ )
{
EbmlElement *l = (*p_info)[i];
......
......@@ -474,10 +474,9 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
demux_sys_t *p_sys = p_demux->p_sys;
matroska_segment_c *p_segment = p_sys->p_current_segment->Segment();
size_t i_track;
unsigned int i;
bool b;
if( !p_segment ) return;
size_t i_track;
if( p_segment->BlockFindTrackIndex( &i_track, block, simpleblock ) )
{
msg_Err( p_demux, "invalid track number" );
......@@ -498,6 +497,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
if ( tk->fmt.i_cat != NAV_ES )
{
bool b;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
if( !b )
......@@ -520,7 +520,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
tk->b_inited = true;
for( i = 0;
for( unsigned int i = 0;
(block != NULL && i < block->NumberFrames()) || (simpleblock != NULL && i < simpleblock->NumberFrames());
i++ )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment