Possibly? Who knows? Parsers are complex and I doubt ffmpeg relies on file extensions to figure out the format.
Confusion:
Are you saying that ffmpeg doesn't detect file by extension?
or
Are you saying that ffmpeg won't execute the malicious code if it's found appended to a valid video?