libavsmash: Integrate common finder of the first valid frame.