mov: fix DTS calculation for samples with negative stts duration
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 27 May 2015 21:57:50 +0000 (23:57 +0200)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 29 May 2015 17:35:58 +0000 (19:35 +0200)
commit153639cb9cfacfdb094f0fa42012fa5c547246f4
treebcf40200df7925b1337ab107927248d602ae6e8f
parent403940de241e8f15ec9eae3e69c6c2f423bafcf5
mov: fix DTS calculation for samples with negative stts duration

A negative sample duration is invalid according to the spec, but there
are samples that use it for the DTS calculation, e.g.:
http://files.1f0.de/samples/mp4-negative-stts-problem.mp4

These currently get out of A/V sync.

Also change the logging type to AV_LOG_WARNING, because decoding the
sample can continue.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/mov.c