Commit da2f982d authored by Steve Lhomme's avatar Steve Lhomme

libmatroska2: cleaning

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@728 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent d7ae0c99
......@@ -82,7 +82,7 @@ err_t MATROSKA_BlockProcessFrameDurations(matroska_block *Block, stream *Input)
if (Err==ERR_NONE)
{
assert(Track!=NULL);
Elt = EBML_MasterFindFirstElt(Track,&MATROSKA_ContextTrackType,0,0);
Elt = EBML_MasterFindChild(Track,&MATROSKA_ContextTrackType);
if (!Elt || EBML_IntegerValue((ebml_integer*)Elt)!=TRACK_TYPE_AUDIO) // other track types not supported for now
Err = ERR_INVALID_DATA;
else
......@@ -91,7 +91,7 @@ err_t MATROSKA_BlockProcessFrameDurations(matroska_block *Block, stream *Input)
Err = ERR_READ;
else
{
Elt = EBML_MasterFindFirstElt(Track,&MATROSKA_ContextCodecID,0,0);
Elt = EBML_MasterFindChild(Track,&MATROSKA_ContextCodecID);
if (!Elt) // missing codec ID
Err = ERR_INVALID_DATA;
else
......@@ -202,10 +202,10 @@ err_t MATROSKA_BlockProcessFrameDurations(matroska_block *Block, stream *Input)
else if (tcsisame_ascii(CodecID,T("A_AAC")) || tcsncmp(CodecID,T("A_AAC/"),6)==0)
{
Block->IsKeyframe = 1; // safety
Elt = EBML_MasterFindFirstElt(Track,&MATROSKA_ContextAudio,0,0);
Elt = EBML_MasterFindChild(Track,&MATROSKA_ContextAudio);
if (Elt)
{
Elt = EBML_MasterFindFirstElt((ebml_master*)Elt,&MATROSKA_ContextSamplingFrequency,0,0);
Elt = EBML_MasterFindChild((ebml_master*)Elt,&MATROSKA_ContextSamplingFrequency);
if (Elt)
{
ArrayResize(&Block->Durations,sizeof(timecode_t)*ARRAYCOUNT(Block->SizeList,int32_t),0);
......@@ -220,7 +220,7 @@ err_t MATROSKA_BlockProcessFrameDurations(matroska_block *Block, stream *Input)
else if (tcsisame_ascii(CodecID,T("A_VORBIS")))
{
Block->IsKeyframe = 1; // safety
Elt = EBML_MasterFindFirstElt(Track,&MATROSKA_ContextCodecPrivate,0,0);
Elt = EBML_MasterFindChild(Track,&MATROSKA_ContextCodecPrivate);
if (Elt)
{
vorbis_info vi;
......
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