LTO detection in the ffmpeg ebuild only checks for the presence of the -flto* flag in *FLAGS to enable LTO in the build system, but if someone has '-flto -fno-lto' as can happen if LTO is enabled globally but disabled for specific packages with files in ${PORTDIR}/env and ${PORTDIR}/package.env the check does not 'see' the '-fno-lto' and enables LTO anyway. In comment https://bugs.gentoo.org/566282#c6 there is a fix for this condition, which has not, so far, been implemented. I will add a github PR soon.
*** This bug has been marked as a duplicate of bug 631352 ***