[libav-devel] [PATCH] matroska: Decode the seek preroll tag

Luca Barbato lu_zero at gentoo.org
Fri Jul 13 02:06:30 CEST 2018


On 28/06/2018 01:08, Luca Barbato wrote:
> Defined in https://datatracker.ietf.org/doc/html/draft-lhomme-cellar-matroska-04#section-8.2.86
> ---
>  libavformat/matroska.h    | 1 +
>  libavformat/matroskadec.c | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
> index 4e9f96e530..eda1dafa91 100644
> --- a/libavformat/matroska.h
> +++ b/libavformat/matroska.h
> @@ -87,6 +87,7 @@
>  #define MATROSKA_ID_CODECDOWNLOADURL 0x26B240
>  #define MATROSKA_ID_CODECDECODEALL 0xAA
>  #define MATROSKA_ID_CODECDELAY 0x56AA
> +#define MATROSKA_ID_SEEKPREROLL 0x56BB
>  #define MATROSKA_ID_TRACKNAME  0x536E
>  #define MATROSKA_ID_TRACKLANGUAGE 0x22B59C
>  #define MATROSKA_ID_TRACKFLAGENABLED 0xB9
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 9c8aea36ff..2c29a3e909 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -171,6 +171,7 @@ typedef struct MatroskaTrack {
>      MatroskaTrackAudio audio;
>      EbmlList encodings;
>      uint64_t codec_delay;
> +    uint64_t seek_preroll;
>  
>      AVStream *stream;
>      int64_t end_timecode;
> @@ -383,6 +384,7 @@ static EbmlSyntax matroska_track[] = {
>      { MATROSKA_ID_CODECID,               EBML_STR,   0, offsetof(MatroskaTrack, codec_id) },
>      { MATROSKA_ID_CODECPRIVATE,          EBML_BIN,   0, offsetof(MatroskaTrack, codec_priv) },
>      { MATROSKA_ID_CODECDELAY,            EBML_UINT,  0, offsetof(MatroskaTrack, codec_delay) },
> +    { MATROSKA_ID_SEEKPREROLL,           EBML_UINT,  0, offsetof(MatroskaTrack, seek_preroll) },
>      { MATROSKA_ID_TRACKLANGUAGE,         EBML_UTF8,  0, offsetof(MatroskaTrack, language),     { .s = "eng"  } },
>      { MATROSKA_ID_TRACKDEFAULTDURATION,  EBML_UINT,  0, offsetof(MatroskaTrack, default_duration) },
>      { MATROSKA_ID_TRACKTIMECODESCALE,    EBML_FLOAT, 0, offsetof(MatroskaTrack, time_scale),   { .f = 1.0  } },
> 

Ping.


More information about the libav-devel mailing list