[FFmpeg-devel,19/21] avformat/matroskadec: Add SilentTracks to cluster syntax

Submitted by Oliver Collyer via ffmpeg-devel on March 27, 2019, 11:18 a.m.

Details

Message ID 20190327111852.3784-20-andreas.rheinhardt@googlemail.com
State New
Headers show

Commit Message

Oliver Collyer via ffmpeg-devel March 27, 2019, 11:18 a.m.
This is important as unknown-sized elements end upon encountering an
unknown EBML ID.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
---
 libavformat/matroska.h    | 1 +
 libavformat/matroskadec.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Steve Lhomme April 7, 2019, 8 a.m.
On 3/27/2019 12:18 PM, Andreas Rheinhardt via ffmpeg-devel wrote:
> This is important as unknown-sized elements end upon encountering an
> unknown EBML ID.

That's the problem with this approach. Noone is allowed to use their own 
custom tags (RAWCooked for example) and the unknown length feature. You 
have to know every element in the world for this not to break.

>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
> ---
>   libavformat/matroska.h    | 1 +
>   libavformat/matroskadec.c | 1 +
>   2 files changed, 2 insertions(+)
>
> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
> index 86968a8de1..43fea595b6 100644
> --- a/libavformat/matroska.h
> +++ b/libavformat/matroska.h
> @@ -224,6 +224,7 @@
>   #define MATROSKA_ID_CLUSTERTIMECODE 0xE7
>   #define MATROSKA_ID_CLUSTERPOSITION 0xA7
>   #define MATROSKA_ID_CLUSTERPREVSIZE 0xAB
> +#define MATROSKA_ID_SILENTTRACKS 0x5854
>   #define MATROSKA_ID_BLOCKGROUP 0xA0
>   #define MATROSKA_ID_BLOCKADDITIONS 0x75A1
>   #define MATROSKA_ID_BLOCKMORE 0xA6
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 60f58cefa9..c1feb3f0a1 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -711,6 +711,7 @@ static const EbmlSyntax matroska_cluster_parsing[] = {
>       { MATROSKA_ID_BLOCKGROUP,      EBML_STOP },
>       { MATROSKA_ID_CLUSTERPOSITION, EBML_NONE },
>       { MATROSKA_ID_CLUSTERPREVSIZE, EBML_NONE },
> +    { MATROSKA_ID_SILENTTRACKS,    EBML_NONE },
>       { 0 }
>   };
>   
> -- 
> 2.19.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Patch hide | download patch | download mbox

diff --git a/libavformat/matroska.h b/libavformat/matroska.h
index 86968a8de1..43fea595b6 100644
--- a/libavformat/matroska.h
+++ b/libavformat/matroska.h
@@ -224,6 +224,7 @@ 
 #define MATROSKA_ID_CLUSTERTIMECODE 0xE7
 #define MATROSKA_ID_CLUSTERPOSITION 0xA7
 #define MATROSKA_ID_CLUSTERPREVSIZE 0xAB
+#define MATROSKA_ID_SILENTTRACKS 0x5854
 #define MATROSKA_ID_BLOCKGROUP 0xA0
 #define MATROSKA_ID_BLOCKADDITIONS 0x75A1
 #define MATROSKA_ID_BLOCKMORE 0xA6
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 60f58cefa9..c1feb3f0a1 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -711,6 +711,7 @@  static const EbmlSyntax matroska_cluster_parsing[] = {
     { MATROSKA_ID_BLOCKGROUP,      EBML_STOP },
     { MATROSKA_ID_CLUSTERPOSITION, EBML_NONE },
     { MATROSKA_ID_CLUSTERPREVSIZE, EBML_NONE },
+    { MATROSKA_ID_SILENTTRACKS,    EBML_NONE },
     { 0 }
 };