Commit d4dec3d8 authored by Laurent Aimar's avatar Laurent Aimar

Upgrade mandatory version for matroska to 0.8.0 and ebml to 0.7.7.

parent a5eae754
...@@ -2745,7 +2745,7 @@ AC_ARG_ENABLE(mkv, ...@@ -2745,7 +2745,7 @@ AC_ARG_ENABLE(mkv,
if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ebml/EbmlVersion.h, [ AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
AC_MSG_CHECKING(for libebml version >= 0.7.6) AC_MSG_CHECKING(for libebml version >= 0.7.7)
AC_EGREP_CPP(yes, AC_EGREP_CPP(yes,
[#include <ebml/EbmlVersion.h> [#include <ebml/EbmlVersion.h>
#ifdef LIBEBML_VERSION #ifdef LIBEBML_VERSION
...@@ -2755,7 +2755,7 @@ if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then ...@@ -2755,7 +2755,7 @@ if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
#endif], #endif],
[AC_MSG_RESULT([yes]) [AC_MSG_RESULT([yes])
AC_CHECK_HEADERS(matroska/KaxVersion.h, [ AC_CHECK_HEADERS(matroska/KaxVersion.h, [
AC_MSG_CHECKING(for libmatroska version >= 0.7.7) AC_MSG_CHECKING(for libmatroska version >= 0.8.0)
AC_EGREP_CPP(yes, AC_EGREP_CPP(yes,
[#include <matroska/KaxVersion.h> [#include <matroska/KaxVersion.h>
#ifdef LIBMATROSKA_VERSION #ifdef LIBMATROSKA_VERSION
......
...@@ -98,12 +98,6 @@ ...@@ -98,12 +98,6 @@
#include "ebml/StdIOCallback.h" #include "ebml/StdIOCallback.h"
#if LIBMATROSKA_VERSION < 0x000706
START_LIBMATROSKA_NAMESPACE
extern const EbmlSemanticContext MATROSKA_DLL_API KaxMatroska_Context;
END_LIBMATROSKA_NAMESPACE
#endif
#include "vlc_keys.h" #include "vlc_keys.h"
extern "C" { extern "C" {
...@@ -1173,18 +1167,10 @@ public: ...@@ -1173,18 +1167,10 @@ public:
void LoadTags( KaxTags *tags ); void LoadTags( KaxTags *tags );
void InformationCreate( ); void InformationCreate( );
void Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_global_position ); void Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_global_position );
#if LIBMATROSKA_VERSION >= 0x000800
int BlockGet( KaxBlock * &, KaxSimpleBlock * &, int64_t *, int64_t *, int64_t *); int BlockGet( KaxBlock * &, KaxSimpleBlock * &, int64_t *, int64_t *, int64_t *);
#else
int BlockGet( KaxBlock * &, int64_t *, int64_t *, int64_t *);
#endif
int BlockFindTrackIndex( size_t *pi_track, int BlockFindTrackIndex( size_t *pi_track,
const KaxBlock *p_block const KaxBlock *, const KaxSimpleBlock * );
#if LIBMATROSKA_VERSION >= 0x000800
, const KaxSimpleBlock *p_simpleblock
#endif
);
bool Select( mtime_t i_start_time ); bool Select( mtime_t i_start_time );
...@@ -1751,15 +1737,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -1751,15 +1737,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
} }
} }
#if LIBMATROSKA_VERSION >= 0x000800
int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_simpleblock, int64_t *pi_ref1, int64_t *pi_ref2, int64_t *pi_duration ) int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_simpleblock, int64_t *pi_ref1, int64_t *pi_ref2, int64_t *pi_duration )
#else
int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64_t *pi_ref2, int64_t *pi_duration )
#endif
{ {
#if LIBMATROSKA_VERSION >= 0x000800
pp_simpleblock = NULL; pp_simpleblock = NULL;
#endif
pp_block = NULL; pp_block = NULL;
*pi_ref1 = 0; *pi_ref1 = 0;
*pi_ref2 = 0; *pi_ref2 = 0;
...@@ -1772,23 +1752,13 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64 ...@@ -1772,23 +1752,13 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64
if ( ep == NULL ) if ( ep == NULL )
return VLC_EGENERIC; return VLC_EGENERIC;
#if LIBMATROSKA_VERSION >= 0x000800
if( pp_simpleblock != NULL || ((el = ep->Get()) == NULL && pp_block != NULL) ) if( pp_simpleblock != NULL || ((el = ep->Get()) == NULL && pp_block != NULL) )
#else
if( (el = ep->Get()) == NULL && pp_block != NULL )
#endif
{ {
/* Check blocks validity to protect againts broken files */ /* Check blocks validity to protect againts broken files */
if( BlockFindTrackIndex( NULL, pp_block if( BlockFindTrackIndex( NULL, pp_block , pp_simpleblock ) )
#if LIBMATROSKA_VERSION >= 0x000800
, pp_simpleblock
#endif
) )
{ {
delete pp_block; delete pp_block;
#if LIBMATROSKA_VERSION >= 0x000800
pp_simpleblock = NULL; pp_simpleblock = NULL;
#endif
pp_block = NULL; pp_block = NULL;
continue; continue;
} }
...@@ -1797,11 +1767,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64 ...@@ -1797,11 +1767,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64
#define idx p_indexes[i_index - 1] #define idx p_indexes[i_index - 1]
if( i_index > 0 && idx.i_time == -1 ) if( i_index > 0 && idx.i_time == -1 )
{ {
#if LIBMATROSKA_VERSION >= 0x000800
if ( pp_simpleblock != NULL ) if ( pp_simpleblock != NULL )
idx.i_time = pp_simpleblock->GlobalTimecode() / (mtime_t)1000; idx.i_time = pp_simpleblock->GlobalTimecode() / (mtime_t)1000;
else else
#endif
idx.i_time = (*pp_block).GlobalTimecode() / (mtime_t)1000; idx.i_time = (*pp_block).GlobalTimecode() / (mtime_t)1000;
idx.b_key = *pi_ref1 == 0 ? true : false; idx.b_key = *pi_ref1 == 0 ? true : false;
} }
...@@ -1887,7 +1855,6 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64 ...@@ -1887,7 +1855,6 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64
i_block_pos = el->GetElementPosition(); i_block_pos = el->GetElementPosition();
ep->Down(); ep->Down();
} }
#if LIBMATROSKA_VERSION >= 0x000800
else if( MKV_IS_ID( el, KaxSimpleBlock ) ) else if( MKV_IS_ID( el, KaxSimpleBlock ) )
{ {
pp_simpleblock = (KaxSimpleBlock*)el; pp_simpleblock = (KaxSimpleBlock*)el;
...@@ -1895,7 +1862,6 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64 ...@@ -1895,7 +1862,6 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, int64_t *pi_ref1, int64
pp_simpleblock->ReadData( es.I_O() ); pp_simpleblock->ReadData( es.I_O() );
pp_simpleblock->SetParent( *cluster ); pp_simpleblock->SetParent( *cluster );
} }
#endif
break; break;
case 3: case 3:
if( MKV_IS_ID( el, KaxBlock ) ) if( MKV_IS_ID( el, KaxBlock ) )
...@@ -1959,13 +1925,8 @@ static block_t *MemToBlock( demux_t *p_demux, uint8_t *p_mem, int i_mem, size_t ...@@ -1959,13 +1925,8 @@ static block_t *MemToBlock( demux_t *p_demux, uint8_t *p_mem, int i_mem, size_t
return p_block; return p_block;
} }
#if LIBMATROSKA_VERSION >= 0x000800
static void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock, static void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock,
mtime_t i_pts, mtime_t i_duration, bool f_mandatory ) mtime_t i_pts, mtime_t i_duration, bool f_mandatory )
#else
static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
mtime_t i_duration, bool f_mandatory )
#endif
{ {
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
matroska_segment_c *p_segment = p_sys->p_current_segment->Segment(); matroska_segment_c *p_segment = p_sys->p_current_segment->Segment();
...@@ -1974,11 +1935,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts, ...@@ -1974,11 +1935,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
unsigned int i; unsigned int i;
bool b; bool b;
if( p_segment->BlockFindTrackIndex( &i_track, block if( p_segment->BlockFindTrackIndex( &i_track, block, simpleblock ) )
#if LIBMATROSKA_VERSION >= 0x000800
, simpleblock
#endif
) )
{ {
msg_Err( p_demux, "invalid track number" ); msg_Err( p_demux, "invalid track number" );
return; return;
...@@ -2020,26 +1977,22 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts, ...@@ -2020,26 +1977,22 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
tk->b_inited = true; tk->b_inited = true;
#if LIBMATROSKA_VERSION >= 0x000800
for( i = 0; for( i = 0;
(block != NULL && i < block->NumberFrames()) || (simpleblock != NULL && i < simpleblock->NumberFrames()); (block != NULL && i < block->NumberFrames()) || (simpleblock != NULL && i < simpleblock->NumberFrames());
i++ ) i++ )
#else
for( i = 0; i < block->NumberFrames(); i++ )
#endif
{ {
block_t *p_block; block_t *p_block;
DataBuffer *data; DataBuffer *data;
#if LIBMATROSKA_VERSION >= 0x000800 if( simpleblock != NULL )
if ( simpleblock != NULL )
{ {
data = &simpleblock->GetBuffer(i); data = &simpleblock->GetBuffer(i);
// condition when the DTS is correct (keyframe or B frame == NOT P frame) // condition when the DTS is correct (keyframe or B frame == NOT P frame)
f_mandatory = simpleblock->IsDiscardable() || simpleblock->IsKeyframe(); f_mandatory = simpleblock->IsDiscardable() || simpleblock->IsKeyframe();
} }
else else
#endif {
data = &block->GetBuffer(i); data = &block->GetBuffer(i);
}
if( tk->i_compression_type == MATROSKA_COMPRESSION_HEADER && tk->p_compression_data != NULL ) if( tk->i_compression_type == MATROSKA_COMPRESSION_HEADER && tk->p_compression_data != NULL )
p_block = MemToBlock( p_demux, data->Buffer(), data->Size(), tk->p_compression_data->GetSize() ); p_block = MemToBlock( p_demux, data->Buffer(), data->Size(), tk->p_compression_data->GetSize() );
...@@ -2143,19 +2096,11 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS ...@@ -2143,19 +2096,11 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
} }
EDocTypeReadVersion doc_read_version = GetChild<EDocTypeReadVersion>(*static_cast<EbmlHead*>(p_l0)); EDocTypeReadVersion doc_read_version = GetChild<EDocTypeReadVersion>(*static_cast<EbmlHead*>(p_l0));
#if LIBMATROSKA_VERSION >= 0x000800
if (uint64(doc_read_version) > 2) if (uint64(doc_read_version) > 2)
{ {
msg_Err( p_demux, "This matroska file is needs version %"PRId64" and this VLC only supports version 1 & 2", uint64(doc_read_version)); msg_Err( p_demux, "This matroska file is needs version %"PRId64" and this VLC only supports version 1 & 2", uint64(doc_read_version));
return NULL; return NULL;
} }
#else
if (uint64(doc_read_version) != 1)
{
msg_Err( p_demux, "This matroska file is needs version %"PRId64" and this VLC only supports version 1", uint64(doc_read_version));
return NULL;
}
#endif
delete p_l0; delete p_l0;
...@@ -3564,17 +3509,12 @@ static int Demux( demux_t *p_demux) ...@@ -3564,17 +3509,12 @@ static int Demux( demux_t *p_demux)
} }
KaxBlock *block; KaxBlock *block;
KaxSimpleBlock *simpleblock;
int64_t i_block_duration = 0; int64_t i_block_duration = 0;
int64_t i_block_ref1; int64_t i_block_ref1;
int64_t i_block_ref2; int64_t i_block_ref2;
#if LIBMATROSKA_VERSION >= 0x000800
KaxSimpleBlock *simpleblock;
if( p_segment->BlockGet( block, simpleblock, &i_block_ref1, &i_block_ref2, &i_block_duration ) ) if( p_segment->BlockGet( block, simpleblock, &i_block_ref1, &i_block_ref2, &i_block_duration ) )
#else
if( p_segment->BlockGet( block, &i_block_ref1, &i_block_ref2, &i_block_duration ) )
#endif
{ {
if ( p_vsegment->Edition() && p_vsegment->Edition()->b_ordered ) if ( p_vsegment->Edition() && p_vsegment->Edition()->b_ordered )
{ {
...@@ -3616,11 +3556,9 @@ static int Demux( demux_t *p_demux) ...@@ -3616,11 +3556,9 @@ static int Demux( demux_t *p_demux)
} }
} }
#if LIBMATROSKA_VERSION >= 0x000800 if( simpleblock != NULL )
if ( simpleblock != NULL )
p_sys->i_pts = (p_sys->i_chapter_time + simpleblock->GlobalTimecode()) / (mtime_t) 1000; p_sys->i_pts = (p_sys->i_chapter_time + simpleblock->GlobalTimecode()) / (mtime_t) 1000;
else else
#endif
p_sys->i_pts = (p_sys->i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000; p_sys->i_pts = (p_sys->i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
if( p_sys->i_pts >= p_sys->i_start_pts ) if( p_sys->i_pts >= p_sys->i_start_pts )
...@@ -3659,11 +3597,7 @@ static int Demux( demux_t *p_demux) ...@@ -3659,11 +3597,7 @@ static int Demux( demux_t *p_demux)
continue; continue;
} }
#if LIBMATROSKA_VERSION >= 0x000800
BlockDecode( p_demux, block, simpleblock, p_sys->i_pts, i_block_duration, i_block_ref1 >= 0 || i_block_ref2 > 0 ); BlockDecode( p_demux, block, simpleblock, p_sys->i_pts, i_block_duration, i_block_ref1 >= 0 || i_block_ref2 > 0 );
#else
BlockDecode( p_demux, block, p_sys->i_pts, i_block_duration, i_block_ref1 >= 0 || i_block_ref2 > 0 );
#endif
delete block; delete block;
i_block_count++; i_block_count++;
...@@ -3858,7 +3792,6 @@ void EbmlParser::Reset( demux_t *p_demux ) ...@@ -3858,7 +3792,6 @@ void EbmlParser::Reset( demux_t *p_demux )
mb_dummy = config_GetInt( p_demux, "mkv-use-dummy" ); mb_dummy = config_GetInt( p_demux, "mkv-use-dummy" );
} }
#if LIBMATROSKA_VERSION >= 0x000800
/* This function workarounds a bug in KaxBlockVirtual implementation */ /* This function workarounds a bug in KaxBlockVirtual implementation */
class KaxBlockVirtualWorkaround : public KaxBlockVirtual class KaxBlockVirtualWorkaround : public KaxBlockVirtual
{ {
...@@ -3869,7 +3802,6 @@ public: ...@@ -3869,7 +3802,6 @@ public:
SetBuffer( NULL, 0 ); SetBuffer( NULL, 0 );
} }
}; };
#endif
EbmlElement *EbmlParser::Get( void ) EbmlElement *EbmlParser::Get( void )
{ {
...@@ -3892,10 +3824,8 @@ EbmlElement *EbmlParser::Get( void ) ...@@ -3892,10 +3824,8 @@ EbmlElement *EbmlParser::Get( void )
m_el[mi_level]->SkipData( *m_es, m_el[mi_level]->Generic().Context ); m_el[mi_level]->SkipData( *m_es, m_el[mi_level]->Generic().Context );
if( !mb_keep ) if( !mb_keep )
{ {
#if LIBMATROSKA_VERSION >= 0x000800
if( MKV_IS_ID( m_el[mi_level], KaxBlockVirtual ) ) if( MKV_IS_ID( m_el[mi_level], KaxBlockVirtual ) )
static_cast<KaxBlockVirtualWorkaround*>(m_el[mi_level])->Fix(); static_cast<KaxBlockVirtualWorkaround*>(m_el[mi_level])->Fix();
#endif
delete m_el[mi_level]; delete m_el[mi_level];
} }
mb_keep = false; mb_keep = false;
...@@ -4887,7 +4817,6 @@ void matroska_segment_c::ParseInfo( KaxInfo *info ) ...@@ -4887,7 +4817,6 @@ void matroska_segment_c::ParseInfo( KaxInfo *info )
} }
} }
#endif #endif
#if LIBMATROSKA_VERSION >= 0x000704
else if( MKV_IS_ID( l, KaxChapterTranslate ) ) else if( MKV_IS_ID( l, KaxChapterTranslate ) )
{ {
KaxChapterTranslate *p_trans = static_cast<KaxChapterTranslate*>( l ); KaxChapterTranslate *p_trans = static_cast<KaxChapterTranslate*>( l );
...@@ -4914,7 +4843,6 @@ void matroska_segment_c::ParseInfo( KaxInfo *info ) ...@@ -4914,7 +4843,6 @@ void matroska_segment_c::ParseInfo( KaxInfo *info )
translations.push_back( p_translate ); translations.push_back( p_translate );
} }
#endif
else else
{ {
msg_Dbg( &sys.demuxer, "| | + Unknown (%s)", typeid(*l).name() ); msg_Dbg( &sys.demuxer, "| | + Unknown (%s)", typeid(*l).name() );
...@@ -5891,9 +5819,7 @@ void virtual_segment_c::AppendUID( const EbmlBinary * p_UID ) ...@@ -5891,9 +5819,7 @@ void virtual_segment_c::AppendUID( const EbmlBinary * p_UID )
void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_global_position ) void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_global_position )
{ {
KaxBlock *block; KaxBlock *block;
#if LIBMATROSKA_VERSION >= 0x000800
KaxSimpleBlock *simpleblock; KaxSimpleBlock *simpleblock;
#endif
int i_track_skipping; int i_track_skipping;
int64_t i_block_duration; int64_t i_block_duration;
int64_t i_block_ref1; int64_t i_block_ref1;
...@@ -5983,11 +5909,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_ ...@@ -5983,11 +5909,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
while( i_track_skipping > 0 ) while( i_track_skipping > 0 )
{ {
#if LIBMATROSKA_VERSION >= 0x000800
if( BlockGet( block, simpleblock, &i_block_ref1, &i_block_ref2, &i_block_duration ) ) if( BlockGet( block, simpleblock, &i_block_ref1, &i_block_ref2, &i_block_duration ) )
#else
if( BlockGet( block, &i_block_ref1, &i_block_ref2, &i_block_duration ) )
#endif
{ {
msg_Warn( &sys.demuxer, "cannot get block EOF?" ); msg_Warn( &sys.demuxer, "cannot get block EOF?" );
...@@ -5997,22 +5919,16 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_ ...@@ -5997,22 +5919,16 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
for( i_track = 0; i_track < tracks.size(); i_track++ ) for( i_track = 0; i_track < tracks.size(); i_track++ )
{ {
#if LIBMATROSKA_VERSION >= 0x000800
if( (simpleblock && tracks[i_track]->i_number == simpleblock->TrackNum()) || if( (simpleblock && tracks[i_track]->i_number == simpleblock->TrackNum()) ||
(block && tracks[i_track]->i_number == block->TrackNum()) ) (block && tracks[i_track]->i_number == block->TrackNum()) )
#else
if( tracks[i_track]->i_number == block->TrackNum() )
#endif
{ {
break; break;
} }
} }
#if LIBMATROSKA_VERSION >= 0x000800
if( simpleblock ) if( simpleblock )
sys.i_pts = (sys.i_chapter_time + simpleblock->GlobalTimecode()) / (mtime_t) 1000; sys.i_pts = (sys.i_chapter_time + simpleblock->GlobalTimecode()) / (mtime_t) 1000;
else else
#endif
sys.i_pts = (sys.i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000; sys.i_pts = (sys.i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
if( i_track < tracks.size() ) if( i_track < tracks.size() )
...@@ -6033,11 +5949,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_ ...@@ -6033,11 +5949,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
{ {
//es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, sys.i_pts ); //es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, sys.i_pts );
#if LIBMATROSKA_VERSION >= 0x000800
BlockDecode( &sys.demuxer, block, simpleblock, sys.i_pts, 0, i_block_ref1 >= 0 || i_block_ref2 > 0 ); BlockDecode( &sys.demuxer, block, simpleblock, sys.i_pts, 0, i_block_ref1 >= 0 || i_block_ref2 > 0 );
#else
BlockDecode( &sys.demuxer, block, sys.i_pts, 0, i_block_ref1 >= 0 || i_block_ref2 > 0 );
#endif
} }
} }
} }
...@@ -6057,11 +5969,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_ ...@@ -6057,11 +5969,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
} }
int matroska_segment_c::BlockFindTrackIndex( size_t *pi_track, int matroska_segment_c::BlockFindTrackIndex( size_t *pi_track,
const KaxBlock *p_block const KaxBlock *p_block, const KaxSimpleBlock *p_simpleblock )
#if LIBMATROSKA_VERSION >= 0x000800
, const KaxSimpleBlock *p_simpleblock
#endif
)
{ {
size_t i_track; size_t i_track;
unsigned int i; unsigned int i;
...@@ -6071,12 +5979,8 @@ int matroska_segment_c::BlockFindTrackIndex( size_t *pi_track, ...@@ -6071,12 +5979,8 @@ int matroska_segment_c::BlockFindTrackIndex( size_t *pi_track,
{ {
const mkv_track_t *tk = tracks[i_track]; const mkv_track_t *tk = tracks[i_track];
#if LIBMATROSKA_VERSION >= 0x000800
if( ( p_block != NULL && tk->i_number == p_block->TrackNum() ) || if( ( p_block != NULL && tk->i_number == p_block->TrackNum() ) ||
( p_simpleblock != NULL && tk->i_number == p_simpleblock->TrackNum() ) ) ( p_simpleblock != NULL && tk->i_number == p_simpleblock->TrackNum() ) )
#else
if( tk->i_number == p_block->TrackNum() )
#endif
{ {
break; break;
} }
......
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