[Matroska-devel] libmatroska CVS + EbmlMaster::Read == b0rk
steve.lhomme at free.fr
Fri Jan 16 09:45:06 CET 2004
> What happens now :
> FindNextElement doesn't recognize KaxTrackVideoDisplayUnit and thus
> keep on searching.
No. It only happens when you don't use AllowDumy (or something like
that), which means that you treat unknown elements in the file as
errors. So you expected this behaviour. It's not a bug, it's a feature
(at least up to now).
> Since it was the last element inside the first
> KaxTrackEntry, It finally find the next KaxTrackEntry. It thus returns
> with UpperElementLevel==2 (indeed a KaxTrackEntry is 2 levels upper
> than the elements inside a KaxTrakVideo element).
> EbmlMaster::Read (KaxTrackVideo level) then leave at once the loop
> because UpperEltFound>0 (see the 'while' test).
> It thus returns, with UpperEltFound==2.
> EbmlMaster::Read (KaxTrackEntry level) had just called
> ElementLevelA->Read, and since MaxSizeToRead==0 it also returns (with
> So now the calling code get a UpperEltLevel==2 as answer from
> libmatroska (compared to 0 in the past) and thus think that the next
> element is 2 levels upper. This was of course true inside libmatroska
> (the next element, a KaxTrackEntry, is indeed 2 levels upper than the
> KaxTrackVideo children), but completly wrong for the calling code
> (which is only inside KaxTracks, i.e. already at the KaxTrackEntry
> This of course make the calling code unable to correctly process the
> next elements until it reaches an element at a upper level.
OK, there might be a bug to update the UpperEltFound value in this case.
I'll try to have a look tonight or this week-end.
More information about the Matroska-devel