demux/mkv: only convert duration if it has a proper value
authorFilip Roséen <filip@atch.se>
Sat, 22 Oct 2016 02:54:10 +0000 (04:54 +0200)
committerThomas Guillem <thomas@gllm.fr>
Wed, 26 Oct 2016 14:30:02 +0000 (16:30 +0200)
commit075c14f54a362f5560326fafef0da315da1ad0b0
tree3b336f1a11dd65e705d51a3e6a0a99e90522d698
parent4828b0f77598a79f92e4799b57757ae4902fb54e
demux/mkv: only convert duration if it has a proper value

matroska_segment_c::i_duration defaults to having a value of "-1", and
we should of course not try to convert the duration from the unit
within an mkv to ours _unless_ we have initialized it (through the
value of a KaxDuration).

These changes fixes that.

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/demux/mkv/matroska_segment_parse.cpp