]> git.sesse.net Git - ffmpeg/commit
lavf/matroskadec: fix is_keyframe for early Blocks
authorChris Cunningham <chcunningham@chromium.org>
Fri, 3 Feb 2017 22:42:44 +0000 (14:42 -0800)
committerwm4 <nfxjfg@googlemail.com>
Mon, 6 Feb 2017 08:33:28 +0000 (09:33 +0100)
commitac25840ee32888f0c13118edeb9404a123cd3a79
tree5f6adff8f7cf2a683091cfd50badfd2f016c549a
parentdfc6e30cd4b9d1817b78579c11fc6881e40b9733
lavf/matroskadec: fix is_keyframe for early Blocks

Blocks are marked as key frames whenever the "reference" field is
zero. This breaks for non-keyframe Blocks with a reference timestamp
of zero.

The likelihood of reference timestamp being zero is increased by a
longstanding bug in muxing that encodes reference timestamp as the
absolute time of the referenced frame (rather than relative to the
current Block timestamp, as described in MKV spec).

Now using INT64_MIN to denote "no reference".

Reported to chromium at http://crbug.com/497889 (contains sample)
libavformat/matroskadec.c