[FFmpeg-devel] [PATCH] matroskaenc: Bump DocTypeVersion to 4

Alexander Strasser eclipse7 at gmx.net
Sat Sep 14 19:57:39 CEST 2013


On 2013-09-14 01:56 -0300, James Almer wrote:
> The muxer has been creating files with v4 elements for some time now,
> and especially now that we can mux non-experimental Opus files, reporting
> the DocTypeVersion as 2 is not correct.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/matroskaenc.c | 2 +-
>  tests/ref/lavf/mkv        | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

  Not necessarily related to this patch:

  Do we need to care about DocTypeReadVersion too, or are all produced
files fine for playback by players that only support version 2. I would
think so, but I did not investigate. E.g. in the case of Opus, will it
play (with problems) or not at all.

  Alexander

> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index a14750b..d502147 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1060,7 +1060,7 @@ static int mkv_write_header(AVFormatContext *s)
>      put_ebml_uint   (pb, EBML_ID_EBMLMAXIDLENGTH    ,           4);
>      put_ebml_uint   (pb, EBML_ID_EBMLMAXSIZELENGTH  ,           8);
>      put_ebml_string (pb, EBML_ID_DOCTYPE            , s->oformat->name);
> -    put_ebml_uint   (pb, EBML_ID_DOCTYPEVERSION     ,           2);
> +    put_ebml_uint   (pb, EBML_ID_DOCTYPEVERSION     ,           4);
>      put_ebml_uint   (pb, EBML_ID_DOCTYPEREADVERSION ,           2);
>      end_ebml_master(pb, ebml_header);
>  
> diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv
> index 4bb97fd..5f91bc7 100644
> --- a/tests/ref/lavf/mkv
> +++ b/tests/ref/lavf/mkv
> @@ -1,6 +1,6 @@
> -6273e6c20231e89e167f99706388b1b5 *./tests/data/lavf/lavf.mkv
> +15361115e62aa4c2413262a00bafadbe *./tests/data/lavf/lavf.mkv
>  472542 ./tests/data/lavf/lavf.mkv
>  ./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
> -36633da729b88a171a0dfc969db23bcc *./tests/data/lavf/lavf.mkv
> +5aab87ea7208b2dd302fde558ee516a3 *./tests/data/lavf/lavf.mkv
>  320274 ./tests/data/lavf/lavf.mkv
>  ./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130914/b8646f57/attachment.asc>


More information about the ffmpeg-devel mailing list