Subject: [Cellar] [PATCH 1/1] Specify a range of >0 for EBMLVersion/EBMLReadVersion

From: Michael Bradshaw <[email-masked]>
Date: Tue, 24 May 2016 13:52:03 -0700

Hi,

I propose the following patch for the EBML specification. Currently,
EBMLVersion and EBMLReadVersion do not have a range specified, suggesting
the value 0 should be legal (albeit probably nonsensical).

>From f0e547502890fa9efa0b966a08544f5b91f8ccd7 Mon Sep 17 00:00:00 2001
From: Michael Bradshaw <[email-masked]>
Date: Tue, 17 May 2016 10:14:42 -0700
Subject: [PATCH 1/1] Specify a range of >0 for EBMLVersion/EBMLReadVersion

---
 specification.markdown | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/specification.markdown b/specification.markdown
index 3f262b9..3fb4b01 100644
--- a/specification.markdown
+++ b/specification.markdown
@@ -336,7 +336,7 @@ Element Name:   EBMLVersion
     EBML ID:        [42][86]
     Mandatory:      Yes
     Multiple:       No
-    Range:          -
+    Range:          >0
     Default:        1
     Element Type:   Unsigned Integer
     Description:    The version of EBML parser used to create the EBML
Document.
@@ -347,7 +347,7 @@ Element Name:   EBMLReadVersion
     EBML ID:        [42][F7]
     Mandatory:      Yes
     Multiple:       No
-    Range:          -
+    Range:          >0
     Default:        1
     Element Type:   Unsigned Integer
     Description:    The minimum EBML version a parser has to support to
read this EBML Document.
--
2.8.0.rc2

---

From: Luca Barbato <[email-masked]>
Date: Tue, 24 May 2016 23:47:40 +0200

>=0 then ?

---

From: Michael Bradshaw <[email-masked]>
Date: Tue, 24 May 2016 14:50:24 -0700

> >=0 then ?

But what does EBML version 0 even mean? I'm not aware of it being a valid
EBML version.

---

From: Dave Rice <[email-masked]>
Date: Tue, 24 May 2016 17:54:27 -0400

> On May 24, 2016, at 5:47 PM, Luca Barbato <[email-masked]> wrote:
> 

AFAIK there have only ever been one version of EBML. With EBMLVersion=1. Perhaps instead of ">0”, we could simply say “1” as no other value is valid. Someday if IETF defines a version 2 of EBML than the Range can be updated to “1-2” and so on.

>>     Description:    The version of EBML parser used to create the EBML

I never really looked at this description too closely but perhaps this should reference the version of the EBML specification rather than the EBML parser. The version of the parser (i.e. libebml) is not what is intended here.

>> @@ -347,7 +347,7 @@ Element Name:   EBMLReadVersion

Same comment as above.

> _______________________________________________
> Cellar mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cellar

---

From: Dave Rice <[email-masked]>
Date: Tue, 24 May 2016 19:47:34 -0400

> On May 24, 2016, at 5:50 PM, Michael Bradshaw <[email-masked]> wrote:
> 
> On Tue, May 24, 2016 at 2:47 PM, Luca Barbato <[email-masked] <mailto:[email-masked]>> wrote:
> >=0 then ?
> 
> But what does EBML version 0 even mean? I'm not aware of it being a valid EBML version.

Of a sample set of online 84,523 mkv files, 20,808 do not store the EBMLVersion element (so the default is ‘1’) and 63,715 set EBMLVersion to 1, and no samples were found to have an EBMLVersion value that was not interpreted as version 1. Still I think it’s a good idea to discourage implementations of EBMLVersion that are confusing in meaning, so a range restriction makes sense to me.
Dave Rice