ffmpeg_player: factor out time to samples conversion to a helper method