[Matroska-devel] 0.5.0beta1 is borked

Moritz Bunkus mosu at bunkus.net
Thu Jul 10 09:51:17 CEST 2003


Hi.

> What does test8 say ?

Successfully opened file "test.mkv" in mode "rb". The handle is
0x8095228

EBML : [1A][45][DF][A3]

- Tags found
  All mandatory elements found
   Tag
    Targets
     Track UID (will be removed)
     Chapter UID
    -- Again After Deletion --
    Targets
     Chapter UID
    -- Done --
    General
     Subject
     Bibliography
     Language
    MultiCommercial
    MultiCommercial
    MultiDate
    MultiDate

> Because test8 works fine when using EbmlMaster::Read or when the reading 
> is done in the while. Maybe your code use something that is not working 
> anymore. Please check your code against EbmlMaster::Read.

You don't see those dummy elements because you don't print unknown
elements but just ignore them. I do print those, and the code I'm using
has been the same for the last 5 months or so.

The thing is that mkvinfo/0.5.0beta1 finds them all, too, just a lot of
dummy elements in between! Have a look at part of the output of
beta1.txt:

|  + Targets at 43
|   + Track UID: 1234 at 46
|   + Chapter UID: 5678 at 51
|   + Unknown element: N7libebml15DummyRawElementE at 56
|   + Unknown element: N7libebml15DummyRawElementE at 292
|   + Unknown element: N7libebml15DummyRawElementE at 385
|   + Unknown element: N7libebml15DummyRawElementE at 494
|   + Unknown element: N7libebml15DummyRawElementE at 615
|   + Unknown element: N7libebml15DummyRawElementE at 647
|   + Unknown element: N7libebml15DummyRawElementE at 732
|   + Unknown element: N7libebml15DummyRawElementE at 774
|   + Unknown element: N7libebml15DummyRawElementE at 820
|  + General at 56
|   + Subject: Subject at 60

The numbers are the file positions. So after ChapterUID has been found
the following code is executed (ChapterUID is a level 4 element called
'l4'):

                  if (upper_lvl_el > 0) {    // we're coming from l5
                    upper_lvl_el--;
                    delete l4;
                    l4 = l5;
                    if (upper_lvl_el > 0)
                      break;
                  
                  } else {
                    l4->SkipData(*es, l4->Generic().Context);
                    delete l4;
                    l4 = es->FindNextElement(l3->Generic().Context,
                                             upper_lvl_el, 0xFFFFFFFFL,
                    true,
                                             1);
                  }


I've checked with gdb and upper_lvl_el is == 0 at the moment, so the
else block is being executed. l4->SkipData, delete l4, l4 =
es->FindNextElement(...). That very FindNextElement returns that
dummyraw element.

The funny thing is that after it has read all those dummyrawelements
(which are at the same positions all the other level 3 elements are
at!!) it jumps BACK to where it found the first dummyrawelement, and
behold, now it finds the known KaxTagGenral.

As I said: Recompiling (make clean all) against alpha3 works fine - no
dummyrawelements at all (apart from the one element that was still
borked in alpha3, but that's not the point). alpha4 behaves just like
beta1.

-- 
 ==> Ciao, Mosu (Moritz Bunkus)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20030710/9f6aadb3/attachment.pgp>


More information about the Matroska-devel mailing list