lavf/matroskadec: fix is_keyframe for early Blocks
authorChris Cunningham <chcunningham@chromium.org>
Fri, 3 Feb 2017 22:42:44 +0000 (14:42 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 6 Feb 2017 10:00:24 +0000 (11:00 +0100)
commitd88493c02b4af3b6c02adb958485250ebd477633
tree1799fa515e758ab53f76ae78667d7ed4d3a5629f
parent87a47c67a6973a76996a43e4112926cdb6d29f74
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)

(cherry picked from commit ac25840ee32888f0c13118edeb9404a123cd3a79)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/matroskadec.c