Blender Git Loki

Git Commits -> Revision 71f2229

Revision 71f2229 by Sybren A. Stüvel (master)
September 19, 2019, 13:12 (GMT)
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

Commit Details:

Full Hash: 71f2229b0d8241ba153abebcc1e0d0e92e877574
Parent Commit: fba35aa
Lines Changed: +26, -1

2 Modified Paths:

/source/blender/imbuf/intern/anim_movie.c (+17, -1) (Diff)
/tests/python/ffmpeg_tests.py (+9, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021