tornavis/tests
Sybren A. Stüvel 71f2229b0d Fix T68091: Adding a corrupt video crashes/confuses Blender
The problematic video from T68091 clearly has an invalid stream duration
(it would be 55 centuries long if interpreted at 30 FPS, and given that
it was recorded with an Android 9 device, it's unlikely that recording
started that long ago). I've added a heuristic to check the stream
duration against the container duration; if the stream is more than 4x
longer than the container, Blender now falls back to the container
duration.

We could use MIN(stream duration, container duration), but there might
be video files out there where the container duration is less precise
than the stream duration; they are measured in different units of time
(microseconds for the container vs. frames for the stream).

Includes a unit test for the above heuristic.

Reviewed by: jbakker

Differential revision: https://developer.blender.org/D5853
2019-09-19 15:12:53 +02:00
..
gtests BLI: make Map.add_or_modify more powerful 2019-09-14 16:25:17 +02:00
python Fix T68091: Adding a corrupt video crashes/confuses Blender 2019-09-19 15:12:53 +02:00
CMakeLists.txt Fix GTests failing on Windows buildbot 2019-09-07 22:51:19 +02:00
check_deprecated.py Cleanup: pep8 2018-07-03 06:55:02 +02:00