23f2db9eedfe32cc0674924f61283ac0572a01ee
Original code was quite unorganized and not as easy to read through. There were basically 3 code paths: 1. Division of `AVStream` duration by its timebase 2. Division of `AVFormatContext` duration by its timebase, with possible AV offset compensation 3. Simply using frame count from `AVStream` Finally there was possibility of ending up with duration of 0 in specific case where `pFormatCtx->duration == AV_NOPTS_VALUE`, but I did not find any test case for this (Added inaebb32748e). During investigation for PR #126866, I have concluded, that before commit8903205dd9, the code which compared duration of stream and container was incorrectly always true. But it resulted in correct behavior for about 4 years. Code was reorganized with that assumption, so above listed code paths are in order of possible execution. Exception is code path 3, which is run first, but it's result is pretty much always discarded. Since all these workarounds are added around code path 3, it is safe to assume, that it is least precise, so it should be considered last. Pull Request: https://projects.blender.org/blender/blender/pulls/127010
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
