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>
Wed, 8 Feb 2017 20:17:51 +0000 (21:17 +0100)
commitb3ae6cfe1104add473e09a5a18b2dfe6d06c1576
tree52be9ca7d2d2fbc6b64731e8ebb411a9957b4887
parentd053b25b59ccfe51f19e61202313d8388a45922a
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