libavformat/matroskadec: fix unsigned overflow to improve seeking
authorChris Cunningham <chcunningham@chromium.org>
Thu, 21 Jul 2016 19:01:45 +0000 (12:01 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 23 Jul 2016 08:32:28 +0000 (10:32 +0200)
commitd59820f6fec3fd112436fb7712e4f9d6d768b664
tree5fd14a2feeb469a550e4530bfc0390fb135d12e8
parent0a088dea3d3335dee885c6486424337649ca2dba
libavformat/matroskadec: fix unsigned overflow to improve seeking

When seeking a file where codec delay is greater than 0, the timecode
can become negative after offsetting by the codec delay. Failing to cast
to a signed int64 will cause the check against skip_to_timecode to evaluate
true for these negative values. This breaks the "skip_to" seek mechanism.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/matroskadec.c