]> git.sesse.net Git - ffmpeg/commit
lavf/matroskaenc: Write Block Keyframe correctly
authorVignesh Venkatasubramanian <vigneshv@google.com>
Thu, 4 Jun 2015 23:29:49 +0000 (16:29 -0700)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Jun 2015 00:48:04 +0000 (02:48 +0200)
commit7be0f48a32155ef9f471ffc5a1b41d662ea337f1
tree0ed6539b17270c7fc9e57d66118828486f108937
parentc94d9079b16c35834b8bcd15cb43ca50e0a25485
lavf/matroskaenc: Write Block Keyframe correctly

Per matroska Block Structure [1], for keyframes 0th bit of the flag
should not be set (unlike SimpleBlocks). For Blocks, keyframes is
inferred by the absence of ReferenceBlock element (as done by
matroskadec). This CL writes the flag correctly and inserts the
ReferenceBlock element for non-keyframes. The timestamp inserted is
that of the immediately preceding frame (which is true for VP8 and VP9
- the only 2 codecs using the matroska block element as of now). It
also considers all non-video frames (audio, subtitles, metadata) to
be keyframes.

[1] http://www.matroska.org/technical/specs/index.html#block_structure

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/matroskaenc.c